I use gohufont in many applications. On the latest unstable channel update Firefox, different gtk applications and slim stopped using gohu and display another truetype font instead.
However other programs like urxvt are not affected.
I'm bisecting to figure out what caused it but there are still ~8 steps to check.
For example try setting
displayManager.slim.theme = pkgs.fetchurl {
url = "https://github.com/rnhmjoj/nix-slim/archive/0.3.0.tar.gz";
sha256 = "0qhha3pggh444s5ba4kcgdxv6d2fmrc7cvvii44c779vinb5wis6";
};
That's likely due to @ttuegel's changes to fontconfig https://github.com/NixOS/nixpkgs/pull/23819
It surely is due to my changes. That's surprising, though, because I removed most of our pre-configured substitutions. Fontconfig never ceases to amaze me.
Could you please post the output of fc-pattern -c -d gohufont and FC_DEBUG=1 fc-match gohufont?
@ttuegel
fc-pattern -c -d gohufont: https://gist.github.com/b55b8442562feae713abaf85c21e1ffa
FC_DEBUG=1 fc-match gohufont: https://gist.github.com/46201c0f57e1ead02d68a31958df8973
The output of FC_DEBUG=1 fc-match gohufont shows that DejaVu Sans is being substituted, i.e. the font cannot be found on your system. Can you find it in the output of fc-list? That will show both the file and the FreeType name of the font. It is possible that the FreeType name changed. (FreeType 2.7 changed how some bitmap fonts are named.)
It has changed indeed. The name is now Gohu GohuFont:
$ fc-list | grep gohu
/nix/store/fl5g3p2xh0rl283348mnqgapjg4gk749-gohufont-2.0/share/fonts/misc/gohufont-11.pcf.gz: Gohu GohuFont:style=Regular
/nix/store/fl5g3p2xh0rl283348mnqgapjg4gk749-gohufont-2.0/share/fonts/misc/gohufont-uni-11.pcf.gz: Gohu GohuFont:style=Regular
/nix/store/fl5g3p2xh0rl283348mnqgapjg4gk749-gohufont-2.0/share/fonts/misc/gohufont-uni-14.pcf.gz: Gohu GohuFont:style=Regular
/nix/store/fl5g3p2xh0rl283348mnqgapjg4gk749-gohufont-2.0/share/fonts/misc/gohufont-uni-11b.pcf.gz: Gohu GohuFont:style=Bold
/nix/store/fl5g3p2xh0rl283348mnqgapjg4gk749-gohufont-2.0/share/fonts/misc/gohufont-uni-14b.pcf.gz: Gohu GohuFont:style=Bold
/nix/store/fl5g3p2xh0rl283348mnqgapjg4gk749-gohufont-2.0/share/fonts/misc/gohufont-11b.pcf.gz: Gohu GohuFont:style=Bold
/nix/store/fl5g3p2xh0rl283348mnqgapjg4gk749-gohufont-2.0/share/fonts/misc/gohufont-14b.pcf.gz: Gohu GohuFont:style=Bold
/nix/store/fl5g3p2xh0rl283348mnqgapjg4gk749-gohufont-2.0/share/fonts/misc/gohufont-14.pcf.gz: Gohu GohuFont:style=Regular
Is there something we can do about it (besides using Gohu GohuFont, gohufont in CSS)?
@rnhmjoj: see https://github.com/NixOS/nixpkgs/pull/23819#issuecomment-289469037
I have found a possible solution here
Ugh, so that would probably be another item into the release notes.
It seems the behavior has been disabled in a subsequent version http://lists.nongnu.org/archive/html/freetype/2017-01/msg00039.html
The following commit seems to be switching to the "old behavior" by default since 2.7.2 (short font names again).
Thanks! We don't even need that commit per-se, we can just forcibly disable the configuration option to prevent changes in the future. (It is fairly simple to enable or disable FreeType options with sed.) I can take care of this, but it will have to go into staging because it's a mass-rebuild.
This actually requires backporting three patches, which I have done in 9b049849bfc385604f240157e129f7a8e3530d7f.
Most helpful comment
This actually requires backporting three patches, which I have done in 9b049849bfc385604f240157e129f7a8e3530d7f.