Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pkgs/data/fonts/google-fonts/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ stdenv.mkDerivation {
rm -rv ofl/comfortaa/*.ttf \
ofl/mavenpro/*.ttf \
ofl/muli/*.ttf \
ofl/oswald/*.ttf
ofl/oswald/*.ttf \
Comment thread
alex-ameen marked this conversation as resolved.
Outdated

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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.


if find . -name "*.ttf" | sed 's|.*/||' | sort | uniq -c | sort -n | grep -v '^.*1 '; then
echo "error: duplicate font names"
Expand Down