-
-
Notifications
You must be signed in to change notification settings - Fork 15k
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
Default fonts configuration not working #16026
Comments
What are the contents of |
The options are reflected in <?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<!-- Default fonts -->
<alias>
<family>sans-serif</family>
<prefer>
<family>Source Sans Pro</family>
</prefer>
</alias>
<alias>
<family>serif</family>
<prefer>
<family>Source Serif Pro</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>Source Code Pro</family>
</prefer>
</alias>
</fontconfig>
|
So it is not a problem with the configuration files. |
After running
# fc-cache -rv
/nix/store/ycpxf0i8df41cd20wbv9amkk1ijjq24a-dejavu-fonts-2.35: caching, new cache contents: 0 fonts, 1 dirs
[...]
Re-scanning /nix/store/bsl0fhisfb180a9v1zrgn3la4ja2m7gv-source-serif-pro-1.017/share/fonts: caching, new cache contents: 0 fonts, 1 dirs
/root/.cache/fontconfig: cleaning cache directory
/var/cache/fontconfig: cleaning cache directory
/nix/store/a8kmvl58x4xsa2flwrz17c4nd3g0khxd-fc-cache: not cleaning unwritable cache directory
fc-cache: succeeded Maybe this can be relevant. |
I don't think so. The unwritable caches are intentional. |
I have also tried disabling fontconfig-ultimate settings (by means of |
Hm, maybe we have the configuration wrong? Try making it work with |
You can check which settings files are loaded by using
maybe that can give you a hint of what is going wrong, the last files loaded should the ones generated by nix:
|
After setting $ export XDG_CONFIG_HOME=~/.config And saving <?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<!-- Default fonts -->
<alias>
<family>sans-serif</family>
<prefer>
<family>Source Sans Pro</family>
</prefer>
</alias>
<alias>
<family>serif</family>
<prefer>
<family>Source Serif Pro</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>Ubuntu Mono</family>
</prefer>
</alias>
</fontconfig> And rebuilding the font information caches (as a normal user) with the command: $ fc-cache -rv The default fonts are not changed: $ fc-match monospace
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"
$ fc-match sans-serif
DejaVuSans.ttf: "DejaVu Sans" "Book"
$ fc-match serif
DejaVuSerif.ttf: "DejaVu Serif" "Book" |
$ FC_DEBUG=1024 fc-match monospace
FC_DEBUG=1024
Loading config file /etc/fonts/2.11/fonts.conf
Scanning config dir /nix/store/s7ik4lhwl0r8kx83x9gly2bb8h52z8r9-fontconfig-2.11.1/etc/fonts/conf.d
Loading config file /nix/store/s7ik4lhwl0r8kx83x9gly2bb8h52z8r9-fontconfig-2.11.1/etc/fonts/conf.d/10-scale-bitmap-fonts.conf
Loading config file /nix/store/s7ik4lhwl0r8kx83x9gly2bb8h52z8r9-fontconfig-2.11.1/etc/fonts/conf.d/20-unhint-small-vera.conf
Loading config file /nix/store/s7ik4lhwl0r8kx83x9gly2bb8h52z8r9-fontconfig-2.11.1/etc/fonts/conf.d/30-metric-aliases.conf
Loading config file /nix/store/s7ik4lhwl0r8kx83x9gly2bb8h52z8r9-fontconfig-2.11.1/etc/fonts/conf.d/30-urw-aliases.conf
Loading config file /nix/store/s7ik4lhwl0r8kx83x9gly2bb8h52z8r9-fontconfig-2.11.1/etc/fonts/conf.d/40-nonlatin.conf
Loading config file /nix/store/s7ik4lhwl0r8kx83x9gly2bb8h52z8r9-fontconfig-2.11.1/etc/fonts/conf.d/45-latin.conf
Loading config file /nix/store/s7ik4lhwl0r8kx83x9gly2bb8h52z8r9-fontconfig-2.11.1/etc/fonts/conf.d/49-sansserif.conf
Loading config file /nix/store/s7ik4lhwl0r8kx83x9gly2bb8h52z8r9-fontconfig-2.11.1/etc/fonts/conf.d/60-latin.conf
Loading config file /nix/store/s7ik4lhwl0r8kx83x9gly2bb8h52z8r9-fontconfig-2.11.1/etc/fonts/conf.d/65-fonts-persian.conf
Loading config file /nix/store/s7ik4lhwl0r8kx83x9gly2bb8h52z8r9-fontconfig-2.11.1/etc/fonts/conf.d/65-nonlatin.conf
Loading config file /nix/store/s7ik4lhwl0r8kx83x9gly2bb8h52z8r9-fontconfig-2.11.1/etc/fonts/conf.d/69-unifont.conf
Loading config file /nix/store/s7ik4lhwl0r8kx83x9gly2bb8h52z8r9-fontconfig-2.11.1/etc/fonts/conf.d/80-delicious.conf
Loading config file /nix/store/s7ik4lhwl0r8kx83x9gly2bb8h52z8r9-fontconfig-2.11.1/etc/fonts/conf.d/90-synthetic.conf
Scanning config dir /etc/fonts/2.11/conf.d
Loading config file /etc/fonts/2.11/conf.d/00-nixos.conf
Loading config file /etc/fonts/2.11/conf.d/10-nixos-rendering.conf
Loading config file /etc/fonts/2.11/conf.d/60-nixos-generic-alias.conf
Loading config file /etc/fonts/2.11/conf.d/99-user.conf
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book" It looks normal to me. |
No, it's defined in standards that |
@romildo Can you try to set the |
@ericsagnes With |
So this should be a priority issue. My guess is that the You can try to use Maybe we should use |
I have edited some of my prior comments to use a more simple font configuration, in the hope it would make it easier to fix this issue. Basically I have disabled fontconfig ultimate and reduced the list of installed fonts |
Looking at each one of the config files reported by the command $ grep -i 'DejaVu Sans Mono' $(grep -lir monospace /nix/store/s7ik4lhwl0r8kx83x9gly2bb8h52z8r9-fontconfig-2.11.1/etc/fonts/conf.d/* /etc/fonts/2.11/conf.d/*)
/nix/store/s7ik4lhwl0r8kx83x9gly2bb8h52z8r9-fontconfig-2.11.1/etc/fonts/conf.d/45-latin.conf: <family>DejaVu Sans Mono</family>
/nix/store/s7ik4lhwl0r8kx83x9gly2bb8h52z8r9-fontconfig-2.11.1/etc/fonts/conf.d/60-latin.conf: <family>DejaVu Sans Mono</family>
Maybe this information can help to find a fix. |
Using $ fc-match -s monospace
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"
DejaVuSansMono-Bold.ttf: "DejaVu Sans Mono" "Bold"
luximr.ttf: "Luxi Mono" "Regular"
FreeMono.ttf: "FreeMono" "нормален"
SourceCodePro-Regular.otf: "Source Code Pro" "Regular"
FreeSans.ttf: "FreeSans" "нормален"
FreeSerif.ttf: "FreeSerif" "нормален"
DejaVuSans.ttf: "DejaVu Sans" "Book"
DejaVuSerif.ttf: "DejaVu Serif" "Book"
SourceSansPro-Regular.otf: "Source Sans Pro" "Regular"
LiberationMono-Regular.ttf: "Liberation Mono" "Regular"
Ubuntu-C.ttf: "Ubuntu Condensed" "Regular"
Ubuntu-R.ttf: "Ubuntu" "Regular"
unifont.ttf: "Unifont" "Medium"
DejaVuSerif-Italic.ttf: "DejaVu Serif" "Italic"
LiberationSerif-Italic.ttf: "Liberation Serif" "Italic"
DejaVuSans-BoldOblique.ttf: "DejaVu Sans" "Bold Oblique"
6x13.pcf.gz: "Fixed" "SemiCondensed"
9x15.pcf.gz: "Fixed" "Regular" |
@ericsagnes This should be closed, right? |
I am seeing this bug again on NixOS unstable 17.09pre107265.0afb6d789c (Hummingbird). I have in fonts = {
fonts = with pkgs; [
dejavu_fonts
source-code-pro
source-sans-pro
source-serif-pro
];
fontconfig = {
penultimate.enable = false;
defaultFonts = {
monospace = [ "Source Code Pro" ];
sansSerif = [ "Source Sans Pro" ];
serif = [ "Source Serif Pro" ];
};
};
}; But sanserif and serif default fonts are not being obeyed:
|
Should be fixed by #25720. |
Issue description
In my unstable NixOS configuration I have
And it seems that the
fonts.fontconfig.defaultFonts
options are not being taken into account:Is there anything missing on the configuration or is it a bug?
Technical details
System: (NixOS:
nixos-version
, Ubuntu/Fedora:lsb_release -a
, ...)16.09pre84674.fbde3a7 (Flounder)
Nix version: (run
nix-env --version
)nix-env (Nix) 1.11.2
Nixpkgs version: (run
nix-instantiate --eval '<nixpkgs>' -A lib.nixpkgsVersion
)"16.09pre84674.fbde3a7"
The text was updated successfully, but these errors were encountered: