-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,8 +49,10 @@ with lib; | |
</fontconfig> | ||
''; | ||
|
||
# Versioned fontconfig > 2.10. Only specify font directories. | ||
|
||
# Versioned fontconfig > 2.10. Take shared fonts.conf from fontconfig. | ||
# Otherwise specify only font directories. | ||
environment.etc."fonts/${pkgs.fontconfig.configVersion}/fonts.conf".source = | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
vcunat
Author
Member
|
||
"${pkgs.fontconfig}/etc/fonts/fonts.conf"; | ||
environment.etc."fonts/${pkgs.fontconfig.configVersion}/conf.d/00-nixos.conf".text = | ||
'' | ||
<?xml version='1.0'?> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
commit 05c6adf8104b4321d3a3716a7b9feb6bf223ed0c (HEAD, nixpkgs) | ||
Author: Vladimír Čunát <[email protected]> | ||
Date: Tue Nov 4 12:24:25 2014 +0100 | ||
|
||
add check for /etc/fonts/@configVersion@/fonts.conf | ||
|
||
It's checked between FONTCONFIG_FILE and the usual /etc/fonts/fonts.conf. | ||
Also, hardcode /etc/fonts/fonts.conf to prevent accidental override. | ||
|
||
diff --git a/src/fccfg.c b/src/fccfg.c | ||
index 6377fd7..e9eb10a 100644 | ||
--- a/src/fccfg.c | ||
+++ b/src/fccfg.c | ||
@@ -2070,8 +2070,13 @@ FcConfigFilename (const FcChar8 *url) | ||
if (!url || !*url) | ||
{ | ||
url = (FcChar8 *) getenv ("FONTCONFIG_FILE"); | ||
+ if (!url) { | ||
+ static const FcChar8 *cfPath = "/etc/fonts/@configVersion@/fonts.conf"; | ||
+ if (access (cfPath, R_OK) == 0) | ||
+ url = cfPath; | ||
+ } | ||
if (!url) | ||
- url = (FcChar8 *) FONTCONFIG_FILE; | ||
+ url = (FcChar8 *) "/etc/fonts/fonts.conf"; | ||
} | ||
file = 0; | ||
|
I wouldn't add this at all unless we handle older fontconfig versions as well. I'd initially let the users manage version-specific configuration in case the find any problem.