-
-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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
Fontconfig incompatibilities #2050
Comments
The only problem I see with hard-coding the default configuration for fontconfig in the store is #1827. If the configuration becomes a hard-coded in the store, users will have to suffer a massive rebuild to override the default configuration. |
That's why I would add something like |
I don't think loading configurations from Would setting |
I believe the answer is yes, as docs http://www.freedesktop.org/software/fontconfig/fontconfig-user.html say:
The |
I like your initial idea. I don't think we can do much better than that without significant rework of |
I'm currently testing an implementation of that (including infinality ported to newest freetype). Expect a PR within a week. |
Is there a reason to use The version of Fontconfig in Nixpkgs now tries to load |
Actually, I stand corrected about patching the configuration. Fontconfig will pick up |
The reasons were described above; shortly: the upstream (font)config changes incompatibly, e.g. now with 2.11 bump. With common config it's probably impossible to support packages that were linked against both versions (not speaking of nixpkgs on other distros where /etc is completely out of control). |
I think I must have misunderstood before. It sounds like the plan is to use |
Well, older versions use what they use, and we can't change what people already have in /nix/store. |
Proposal for merging into the @vcunat branch: https://github.com/lethalman/nixpkgs/tree/fontconfig
Nixos Nixos should write an That means, applications using Non-nixos This still breaks non-nixos applications, since with fontconfig 2.11 the /etc/fonts/2.11 is non-existent. The gui will be full of ugly squares, unless in nix.sh we explicitly set FONTCONFIG_FILE like we do for ca-certs: https://github.com/NixOS/nix/blob/master/scripts/nix-profile.sh.in , that will only work with nix 1.8. |
Well, IMO our 2.11 should not read |
Ah, no, it does work. I forgot to clear the |
Resolved. Latest discussion in #4410. |
Situation
Currently we have fontconfig-2.10.*. With 2.11 the format of fontconfig's xmls changed a bit. Newer fontconfig probably works with old-style
/etc/fonts
since b16994f, but the other way won't work (it doesn't handle invalid config well).If we want to use
/etc/fonts
of non-nixos, then I don't think we can do that without nontrivial patching work to make fontconfig better handle invalid files. The issue there is worse, as we don't even know/control what is in/etc/
, so either of the versions probably won't work (and we don't know which).First ideas
My long-term opinion is that generally, default configuration should be hard-coded in nix store, and
/etc/*
should be minimal, only specifying where that particular machine wants something different than default.With fontconfig this is doable, IIRC, by specifying an include of some
/etc/
path in the nix-stored config. If the format changes in future, I only expect it would be in a little used part again, so it seems much less likely that someone gets into a similar conflict in future.If this config override was present on some non-standard
/etc/
path in nixos, then people could do overrides in there. On non-nixos people would get the default behavior regardless of their/etc/fonts
, which is IMHO the best we can currently do with fontconfig behaving this way. (I would have to check if including a non-existent file leads to similar problems, but that should be a single easily patchable case.)The discussion started below #2020 (comment)
The text was updated successfully, but these errors were encountered: