Skip to content

Separate AdobeBlank-Regular.ttf from google-fonts package, moved to google-fonts.adobeBlank#103779

Merged
jtojnar merged 2 commits intoNixOS:masterfrom
alex-ameen:fix_google_fonts_adobe_blank
Nov 23, 2020
Merged

Separate AdobeBlank-Regular.ttf from google-fonts package, moved to google-fonts.adobeBlank#103779
jtojnar merged 2 commits intoNixOS:masterfrom
alex-ameen:fix_google_fonts_adobe_blank

Conversation

@alex-ameen
Copy link
Contributor

@alex-ameen alex-ameen commented Nov 14, 2020

modified:   default.nix
Motivation for this change

This absurdly large font causes libfontconfig to get trapped processing for hours. It managed to break my emacs and thunderbird packages. ( emacs did manage to respond after 40+ hours of me leaving it to run, thunderbird died immediately at startup ).

Frankly I don't know what Adobe was aiming to do with this font, but it has over 550,000 symbols, which is enough to murder fontconfig. Some "ancient wisdom" left in a log from a Google dev back in 2014 was helpful, as well as some discussions about a related issue with fontconfig #101813 and #73795

I tested the build by itself, as well as across my usual NixOS system.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Nov 14, 2020

# This abomination of a font causes crashes with `libfontconfig',
# It has an absurd number of symbols
rm -r ofl/adobeblank/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could add outputs = [ "out" "adobeBlank" ]; after the version attribute and use moveToOutput share/fonts/truetype/something.ttf "$adobeBlank" where something.ttf are the file names of Adobe Blank font files in installPhase.

That way it will not be installed by default but interested people will still be able to install it using google-fonts.adobeBlank.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds like a good plan.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried using moveToOutput during installPhase, but it wasn't working as expected.
I went ahead and did it the ol' fashioned way.

rm was necessary to prevent the font from being installed to $out.

I have tested google-fonts and google-fonts.adobeBlank, and they work as expected.

@alex-ameen alex-ameen changed the title Remove AdobeBlank-Regular.ttf from google-fonts package Separate AdobeBlank-Regular.ttf from google-fonts package, moved to google-fonts.adobeBlank Nov 15, 2020
@alex-ameen alex-ameen requested a review from jtojnar November 23, 2020 02:42
@jtojnar jtojnar merged commit 3f17975 into NixOS:master Nov 23, 2020
@jtojnar
Copy link
Member

jtojnar commented Nov 23, 2020

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants