diff --git a/pkgs/data/fonts/libertine/2.7.nix b/pkgs/data/fonts/libertine/2.7.nix index 3210f20d5018..271e128b1298 100644 --- a/pkgs/data/fonts/libertine/2.7.nix +++ b/pkgs/data/fonts/libertine/2.7.nix @@ -12,6 +12,9 @@ rec { phaseNames = ["doUnpack" "generateFontsFromSFD" "installFonts"]; createTTF=false; + extraFontForgeCommands = '' + ScaleToEm(1000); + ''; name = "linux-libertine-" + version; meta = { diff --git a/pkgs/top-level/builder-defs.nix b/pkgs/top-level/builder-defs.nix index 8d839c3ba09e..ee7aafbdd25a 100644 --- a/pkgs/top-level/builder-defs.nix +++ b/pkgs/top-level/builder-defs.nix @@ -410,8 +410,9 @@ args: with args; with stringsWithDeps; with lib; generateFontsFromSFD = noDepEntry('' for i in *.sfd; do ${args.fontforge}/bin/fontforge -c \ - 'Open($1); - Reencode("unicode"); + 'Open($1); + ${optionalString (args ? extraFontForgeCommands) args.extraFontForgeCommands + }Reencode("unicode"); ${optionalString (getAttr ["createTTF"] true args) ''Generate($1:r + ".ttf");''} ${optionalString (getAttr ["createOTF"] true args) ''Generate($1:r + ".otf");''} Reencode("TeX-Base-Encoding");