Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enableGhostscriptFonts enabled, but no ghostscript fonts are showing up #59379

Open
stepcut opened this issue Apr 13, 2019 · 3 comments
Open

Comments

@stepcut
Copy link
Contributor

stepcut commented Apr 13, 2019

Issue description

I have enableGhostscriptFonts = true in my config,

      fonts = {
        enableGhostscriptFonts = true;
        fonts = with pkgs; [
  	  liberation_ttf
          fonts-arphic-ukai
        ];
      };

The ghostscript fonts are visible to fc-cache and fc-cat, but not fc-list or fc-match.

When I run fc-cache -rv the fonts are found in the ghostscript directory:

[jeremy@webserver:/etc/fonts]$ fc-cache -rv
/nix/store/9agmxvxdpx2haqn4plrjl5ac7ki8mks3-liberation-fonts-2.00.1: caching, new cache contents: 0 fonts, 1 dirs
/nix/store/9agmxvxdpx2haqn4plrjl5ac7ki8mks3-liberation-fonts-2.00.1/share: caching, new cache contents: 0 fonts, 2 dirs
/nix/store/9agmxvxdpx2haqn4plrjl5ac7ki8mks3-liberation-fonts-2.00.1/share/doc: caching, new cache contents: 0 fonts, 1 dirs
/nix/store/9agmxvxdpx2haqn4plrjl5ac7ki8mks3-liberation-fonts-2.00.1/share/doc/liberation-fonts-2.00.1: caching, new cache contents: 0 fonts, 0 dirs
/nix/store/9agmxvxdpx2haqn4plrjl5ac7ki8mks3-liberation-fonts-2.00.1/share/fonts: caching, new cache contents: 0 fonts, 1 dirs
/nix/store/9agmxvxdpx2haqn4plrjl5ac7ki8mks3-liberation-fonts-2.00.1/share/fonts/truetype: caching, new cache contents: 12 fonts, 0 dirs
/nix/store/a4zxlbgya1zcmqq4skw5ich7c1gz0brq-fonts-arphic-ukai-0.2.20080216.2: caching, new cache contents: 0 fonts, 1 dirs
/nix/store/a4zxlbgya1zcmqq4skw5ich7c1gz0brq-fonts-arphic-ukai-0.2.20080216.2/share: caching, new cache contents: 0 fonts, 1 dirs
/nix/store/a4zxlbgya1zcmqq4skw5ich7c1gz0brq-fonts-arphic-ukai-0.2.20080216.2/share/fonts: caching, new cache contents: 0 fonts, 1 dirs
/nix/store/a4zxlbgya1zcmqq4skw5ich7c1gz0brq-fonts-arphic-ukai-0.2.20080216.2/share/fonts/truetype: caching, new cache contents: 4 fonts, 0 dirs
/nix/store/klfw8kyvxrn87cjc4b57p8r5lafz7yjc-ghostscript-9.25/share/ghostscript/fonts: caching, new cache contents: 52 fonts, 0 dirs
/home/jeremy/.local/share/fonts: caching, new cache contents: 52 fonts, 0 dirs
/nix/store/8gn2b5vvlazg608cj1y5l4igp9rckmnq-dejavu-fonts-minimal-2.37: caching, new cache contents: 0 fonts, 1 dirs
/nix/store/8gn2b5vvlazg608cj1y5l4igp9rckmnq-dejavu-fonts-minimal-2.37/share: caching, new cache contents: 0 fonts, 1 dirs
/nix/store/8gn2b5vvlazg608cj1y5l4igp9rckmnq-dejavu-fonts-minimal-2.37/share/fonts: caching, new cache contents: 0 fonts, 1 dirs
/nix/store/8gn2b5vvlazg608cj1y5l4igp9rckmnq-dejavu-fonts-minimal-2.37/share/fonts/truetype: caching, new cache contents: 1 fonts, 0 dirs
/home/jeremy/.nix-profile/lib/X11/fonts: skipping, no such directory
/home/jeremy/.nix-profile/share/fonts: skipping, no such directory
/nix/var/nix/profiles/default/lib/X11/fonts: skipping, no such directory
/nix/var/nix/profiles/default/share/fonts: skipping, no such directory
/home/jeremy/.cache/fontconfig: cleaning cache directory
/var/cache/fontconfig: not cleaning non-existent cache directory
/nix/store/fk7yc2rzl3gcakwqmdqar8gfznma7fha-fc-cache: not cleaning unwritable cache directory
fc-cache: succeeded

And fc-cat | grep Nimbus shows multiple matches such as:

"n022024l.pfb" 0 "Nimbus Mono L:style=Bold Oblique:stylelang=en,en:slant=110:weight=200:width=100:foundry=urw:index=0:outline=True:scalable=True:charset=20-7e a0-17f 192 218-21b 2c6-2c7 2c9 2d8-2dd 394 3bc 400-45f 48c-4c4 4c7-4c8 4cb-4cc 4d0-4f5 4f8-4f9 2013-2014 2018-201a 201c-201e 2020-2022 2026 2030 2039-203a 2044 20ac 2116 2122 2202 2206 2211-2212 2215 2219-221a 221e 2260 2264-2265 25ca f6c3 fb01-fb02:lang=aa|ab|af|av|ay|ba|be|bg|bi|br|bs|bua|ca|ce|ch|chm|co|cs|cv|da|de|en|eo|es|et|eu|fi|fj|fo|fr|fur|fy|gd|gl|gv|ho|hr|hu|ia|id|ie|ik|io|is|it|kaa|ki|kk|kl|kum|kv|ky|la|lb|lez|lt|lv|mg|mh|mk|mo|mt|nb|nds|nl|nn|no|nr|nso|ny|oc|om|os|pl|pt|rm|ro|ru|sah|se|sel|sh|sk|sl|sma|smj|smn|so|sq|sr|ss|st|sv|sw|tg|tk|tl|tn|tr|ts|tt|tyv|uk|uz|vo|vot|wa|wen|wo|xh|yap|zu|an|crh|csb|fil|hsb|ht|jv|kj|ku-tr|kwm|lg|li|mn-mn|ms|na|ng|pap-an|pap-aw|rn|rw|sc|sg|sn|su|za:fontversion=0:fontformat=Type 1:decorative=False:postscriptname=NimbusMonL-BoldObli:color=False:symbol=False"

But when I run fc-list none of the ghostscript fonts show up:

$ fc-list
/nix/store/9agmxvxdpx2haqn4plrjl5ac7ki8mks3-liberation-fonts-2.00.1/share/fonts/truetype/LiberationMono-Italic.ttf: Liberation Mono:style=Italic
/nix/store/9agmxvxdpx2haqn4plrjl5ac7ki8mks3-liberation-fonts-2.00.1/share/fonts/truetype/LiberationSans-Italic.ttf: Liberation Sans:style=Italic
/nix/store/a4zxlbgya1zcmqq4skw5ich7c1gz0brq-fonts-arphic-ukai-0.2.20080216.2/share/fonts/truetype/ukai.ttc: AR PL UKai TW MBE:style=Book
/nix/store/9agmxvxdpx2haqn4plrjl5ac7ki8mks3-liberation-fonts-2.00.1/share/fonts/truetype/LiberationSerif-Regular.ttf: Liberation Serif:style=Regular
/nix/store/9agmxvxdpx2haqn4plrjl5ac7ki8mks3-liberation-fonts-2.00.1/share/fonts/truetype/LiberationSans-Bold.ttf: Liberation Sans:style=Bold
/nix/store/9agmxvxdpx2haqn4plrjl5ac7ki8mks3-liberation-fonts-2.00.1/share/fonts/truetype/LiberationMono-BoldItalic.ttf: Liberation Mono:style=Bold Italic
/nix/store/9agmxvxdpx2haqn4plrjl5ac7ki8mks3-liberation-fonts-2.00.1/share/fonts/truetype/LiberationSans-Regular.ttf: Liberation Sans:style=Regular
/nix/store/8gn2b5vvlazg608cj1y5l4igp9rckmnq-dejavu-fonts-minimal-2.37/share/fonts/truetype/DejaVuSans.ttf: DejaVu Sans:style=Book
/nix/store/9agmxvxdpx2haqn4plrjl5ac7ki8mks3-liberation-fonts-2.00.1/share/fonts/truetype/LiberationSans-BoldItalic.ttf: Liberation Sans:style=Bold Italic
/nix/store/9agmxvxdpx2haqn4plrjl5ac7ki8mks3-liberation-fonts-2.00.1/share/fonts/truetype/LiberationMono-Bold.ttf: Liberation Mono:style=Bold
/nix/store/9agmxvxdpx2haqn4plrjl5ac7ki8mks3-liberation-fonts-2.00.1/share/fonts/truetype/LiberationSerif-Bold.ttf: Liberation Serif:style=Bold
/nix/store/9agmxvxdpx2haqn4plrjl5ac7ki8mks3-liberation-fonts-2.00.1/share/fonts/truetype/LiberationMono-Regular.ttf: Liberation Mono:style=Regular
/nix/store/9agmxvxdpx2haqn4plrjl5ac7ki8mks3-liberation-fonts-2.00.1/share/fonts/truetype/LiberationSerif-Italic.ttf: Liberation Serif:style=Italic
/nix/store/a4zxlbgya1zcmqq4skw5ich7c1gz0brq-fonts-arphic-ukai-0.2.20080216.2/share/fonts/truetype/ukai.ttc: AR PL UKai HK:style=Book
/nix/store/a4zxlbgya1zcmqq4skw5ich7c1gz0brq-fonts-arphic-ukai-0.2.20080216.2/share/fonts/truetype/ukai.ttc: AR PL UKai CN:style=Book
/nix/store/a4zxlbgya1zcmqq4skw5ich7c1gz0brq-fonts-arphic-ukai-0.2.20080216.2/share/fonts/truetype/ukai.ttc: AR PL UKai TW:style=Book
/nix/store/9agmxvxdpx2haqn4plrjl5ac7ki8mks3-liberation-fonts-2.00.1/share/fonts/truetype/LiberationSerif-BoldItalic.ttf: Liberation Serif:style=Bold Italic

And fc-match Nimbus does not match:

$ fc-match -s "Nimbus Mono L"
DejaVuSans.ttf: "DejaVu Sans" "Book"
LiberationMono-Regular.ttf: "Liberation Mono" "Regular"
LiberationSans-Regular.ttf: "Liberation Sans" "Regular"
LiberationSerif-Regular.ttf: "Liberation Serif" "Regular"
ukai.ttc: "AR PL UKai CN" "Book"
ukai.ttc: "AR PL UKai HK" "Book"
ukai.ttc: "AR PL UKai TW MBE" "Book"
LiberationSerif-Italic.ttf: "Liberation Serif" "Italic"

Technical details

 nix-info -m
 - system: `"x86_64-linux"`
 - host os: `Linux 4.4.36, NixOS, 19.03pre-git (Koi)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.1.3`
 - channels(root): `"nixos-16.09.666.3738950"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
@stepcut
Copy link
Contributor Author

stepcut commented Apr 15, 2019

Also important -- I tried copying the ghostscript fonts into my home directory. fc-cache sees them but fc-list ignores them there as well:

/home/jeremy/.local/share/fonts: caching, new cache contents: 52 fonts, 0 dirs

This is either a bug in fontconfig or (more likely?) some option in fonts.conf is telling fontconfig to ignore the fonts.

@stepcut
Copy link
Contributor Author

stepcut commented Apr 15, 2019

I added the option:

fonts.fontconfig.allowType1 = true;

And now the ghostscript fonts are working. At a minimum the enableGhostscriptFonts documentation should mention this requirement. Even better would be if enableGhostscriptFonts enabled the option, or at least gave a warning or error if allowType1 is not true.

I am leaving this issue open since enableGhostscriptFonts = true is not sufficient to enable the ghostscript fonts.

@stale
Copy link

stale bot commented Jun 3, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 3, 2020
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants