aboutsummaryrefslogtreecommitdiffstats
path: root/_config
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2016-12-06 21:55:02 +0800
committerAaron LI <aaronly.me@outlook.com>2016-12-06 21:55:02 +0800
commitc51a8d9f62ba9fd260ab3d4cde164c081ed20988 (patch)
treecbd106acbad1498d50989a4993288f1901e414eb /_config
parented5c60d80b163b4ba7204d7ab694c0ca0607cffa (diff)
downloaddotfiles-c51a8d9f62ba9fd260ab3d4cde164c081ed20988.tar.bz2
fontconfig: Re-order configs; Move "fonts.conf" as "50-user.conf"
NOTE: Explicitly set the orders for Noto CJK fonts (SC, TC, JP, KR), in order to get rid of "LC_CTYPE" environment variable. Therefore, the preferred English fonts (e.g., Source Code Pro, Source Sans Pro) are by default used, avoiding the Chinese fonts being prepend at the beginning.
Diffstat (limited to '_config')
-rw-r--r--_config/fontconfig/conf.d/50-user.conf (renamed from _config/fontconfig/fonts.conf)78
-rw-r--r--_config/fontconfig/conf.d/65-noto-cjk-common.conf45
-rw-r--r--_config/fontconfig/conf.d/65-noto-cjk-ja.conf (renamed from _config/fontconfig/conf.d/41-noto-cjk-sans-jp.conf)41
-rw-r--r--_config/fontconfig/conf.d/65-noto-cjk-ko.conf (renamed from _config/fontconfig/conf.d/41-noto-cjk-sans-kr.conf)41
-rw-r--r--_config/fontconfig/conf.d/65-noto-cjk-zh-cn.conf (renamed from _config/fontconfig/conf.d/41-noto-cjk-sans-sc.conf)58
-rw-r--r--_config/fontconfig/conf.d/65-noto-cjk-zh-tw.conf (renamed from _config/fontconfig/conf.d/41-noto-cjk-sans-tc.conf)58
-rw-r--r--_config/fontconfig/conf.d/66-noto-cursive.conf (renamed from _config/fontconfig/conf.d/40-noto-cursive.conf)0
-rw-r--r--_config/fontconfig/conf.d/66-noto-fantasy.conf (renamed from _config/fontconfig/conf.d/40-noto-fantasy.conf)0
-rw-r--r--_config/fontconfig/conf.d/66-noto-mono.conf (renamed from _config/fontconfig/conf.d/40-noto-mono.conf)0
-rw-r--r--_config/fontconfig/conf.d/66-noto-sans.conf (renamed from _config/fontconfig/conf.d/40-noto-sans.conf)0
-rw-r--r--_config/fontconfig/conf.d/66-noto-serif.conf (renamed from _config/fontconfig/conf.d/40-noto-serif.conf)0
11 files changed, 103 insertions, 218 deletions
diff --git a/_config/fontconfig/fonts.conf b/_config/fontconfig/conf.d/50-user.conf
index a4031e1..fda01a0 100644
--- a/_config/fontconfig/fonts.conf
+++ b/_config/fontconfig/conf.d/50-user.conf
@@ -2,26 +2,32 @@
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
- <!--
- Custom font configurations
+<!--
+User-wide font configurations
- System-wide location:
- /etc/fonts/local.conf
- User-wide location:
- $XDG_CONFIG_HOME/fontconfig/fonts.conf
- (default: ~/.config/fontconfig/fonts.conf)
+Configuration file ordering (prefix & description):
+50 : User overrides
+51 : Local system overrides
+55-59 : High priority LGC (latin greek cyrillic) fonts
+ (distribution general-purpose default fonts)
+60 : Main LGC font list
+61-64 : Low priority LGC fonts
+65-69 : Fonts with less common encodings, ending with fonts that
+ provide coverage of exotic unicode blocks at the expense of
+ drawing quality.
- References:
- [1] https://freedesktop.org/software/fontconfig/fontconfig-user.html
- [2] https://wiki.archlinux.org/index.php/font_configuration
- [3] https://wiki.gentoo.org/wiki/Fontconfig
- [4] https://eev.ee/blog/2015/05/20/i-stared-into-the-fontconfig-and-the-fontconfig-stared-back-at-me/
+References:
+[1] https://freedesktop.org/software/fontconfig/fontconfig-user.html
+ See also `fonts.conf(5)'
+[2] https://fedoraproject.org/wiki/Fontconfig_packaging_tips
+[3] https://wiki.archlinux.org/index.php/font_configuration
+[4] https://wiki.gentoo.org/wiki/Fontconfig
+[5] https://eev.ee/blog/2015/05/20/i-stared-into-the-fontconfig-and-the-fontconfig-stared-back-at-me/
- Aaron LI
- Created: 2014-04-06
- Updated: 2016-12-05
- -->
+Aaron LI
+Created: 2014-04-06
+-->
<!--
Set correct common families for custom "serif" and "monospace" fonts,
@@ -43,30 +49,6 @@
<default><family>monospace</family></default>
</alias>
- <!--
- By default, fontconfig assumes any unrecognized font is "sans-serif",
- so the above custom fonts now have *both* families. Fix this.
- -->
- <match>
- <test compare="eq" name="family">
- <string>sans-serif</string>
- </test>
- <test compare="eq" name="family">
- <string>serif</string>
- </test>
- <!-- The "delete" applies to the *first* match -->
- <edit mode="delete" name="family"/>
- </match>
- <match>
- <test compare="eq" name="family">
- <string>sans-serif</string>
- </test>
- <test compare="eq" name="family">
- <string>monospace</string>
- </test>
- <edit mode="delete" name="family"/>
- </match>
-
<!-- Font families preferences -->
<!--
<alias> elements provide a shorthand notation for the set of common
@@ -76,17 +58,11 @@
-->
<!-- "serif" font family -->
<alias>
- <!-- Which font family to be edited -->
<family>serif</family>
- <!-- List of font families to *prepend before* the matching family -->
<prefer>
<family>Source Serif Pro</family>
<family>Noto Serif</family>
</prefer>
- <!-- List of font families to *append after* the matching family -->
- <accept></accept>
- <!-- List of font families to *append* to the *end* of matching family -->
- <default></default>
</alias>
<!-- "sans-serif" font family -->
<alias>
@@ -94,6 +70,11 @@
<prefer>
<family>Source Sans Pro</family>
<family>Noto Sans</family>
+ <!-- Also ordering the Noto CJK fonts for "zh-cn"-->
+ <family>Noto Sans CJK SC</family>
+ <family>Noto Sans CJK TC</family>
+ <family>Noto Sans CJK JP</family>
+ <family>Noto Sans CJK KR</family>
</prefer>
</alias>
<!-- "monospace" font family -->
@@ -103,6 +84,11 @@
<family>Source Code Pro</family>
<family>Fira Code</family>
<family>Noto Mono</family>
+ <!-- Also ordering the Noto CJK fonts for "zh-cn"-->
+ <family>Noto Sans Mono CJK SC</family>
+ <family>Noto Sans Mono CJK TC</family>
+ <family>Noto Sans Mono CJK JP</family>
+ <family>Noto Sans Mono CJK KR</family>
</prefer>
</alias>
diff --git a/_config/fontconfig/conf.d/65-noto-cjk-common.conf b/_config/fontconfig/conf.d/65-noto-cjk-common.conf
new file mode 100644
index 0000000..719e18d
--- /dev/null
+++ b/_config/fontconfig/conf.d/65-noto-cjk-common.conf
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<fontconfig>
+
+ <!--
+ Google Noto CJK font common configurations
+ -->
+
+ <!-- Generic family name assignment -->
+ <!-- sans-serif -->
+ <alias>
+ <family>Noto Sans CJK SC</family>
+ <default><family>sans-serif</family></default>
+ </alias>
+ <alias>
+ <family>Noto Sans CJK TC</family>
+ <default><family>sans-serif</family></default>
+ </alias>
+ <alias>
+ <family>Noto Sans CJK JP</family>
+ <default><family>sans-serif</family></default>
+ </alias>
+ <alias>
+ <family>Noto Sans CJK KR</family>
+ <default><family>sans-serif</family></default>
+ </alias>
+
+ <!-- monospace -->
+ <alias>
+ <family>Noto Sans Mono CJK SC</family>
+ <default><family>monospace</family></default>
+ </alias>
+ <alias>
+ <family>Noto Sans Mono CJK TC</family>
+ <default><family>monospace</family></default>
+ </alias>
+ <alias>
+ <family>Noto Sans Mono CJK JP</family>
+ <default><family>monospace</family></default>
+ </alias>
+ <alias>
+ <family>Noto Sans Mono CJK KR</family>
+ <default><family>monospace</family></default>
+ </alias>
+</fontconfig>
diff --git a/_config/fontconfig/conf.d/41-noto-cjk-sans-jp.conf b/_config/fontconfig/conf.d/65-noto-cjk-ja.conf
index 1889885..0ab7e53 100644
--- a/_config/fontconfig/conf.d/41-noto-cjk-sans-jp.conf
+++ b/_config/fontconfig/conf.d/65-noto-cjk-ja.conf
@@ -9,60 +9,29 @@
* Fedora package: google-noto-cjk-fonts
-->
+ <!-- sans-serif -->
<match>
<test name="lang">
<string>ja</string>
</test>
<test name="family">
- <string>monospace</string>
- </test>
- <edit name="family" mode="prepend">
- <string>Noto Sans Mono CJK JP</string>
- </edit>
- </match>
-
- <alias>
- <family>Noto Sans Mono CJK JP</family>
- <default>
- <family>monospace</family>
- </default>
- </alias>
-
- <match>
- <test name="lang">
- <string>ja</string>
- </test>
- <test name="family">
- <string>serif</string>
+ <string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Noto Sans CJK JP</string>
</edit>
</match>
- <alias>
- <family>Noto Sans CJK JP</family>
- <default>
- <family>serif</family>
- </default>
- </alias>
-
+ <!-- monospace -->
<match>
<test name="lang">
<string>ja</string>
</test>
<test name="family">
- <string>sans-serif</string>
+ <string>monospace</string>
</test>
<edit name="family" mode="prepend">
- <string>Noto Sans CJK JP</string>
+ <string>Noto Sans Mono CJK JP</string>
</edit>
</match>
-
- <alias>
- <family>Noto Sans CJK JP</family>
- <default>
- <family>sans-serif</family>
- </default>
- </alias>
</fontconfig>
diff --git a/_config/fontconfig/conf.d/41-noto-cjk-sans-kr.conf b/_config/fontconfig/conf.d/65-noto-cjk-ko.conf
index 6f243d7..fef44d6 100644
--- a/_config/fontconfig/conf.d/41-noto-cjk-sans-kr.conf
+++ b/_config/fontconfig/conf.d/65-noto-cjk-ko.conf
@@ -9,60 +9,29 @@
* Fedora package: google-noto-cjk-fonts
-->
+ <!-- sans-serif -->
<match>
<test name="lang">
<string>ko</string>
</test>
<test name="family">
- <string>monospace</string>
- </test>
- <edit name="family" mode="prepend">
- <string>Noto Sans Mono CJK KR</string>
- </edit>
- </match>
-
- <alias>
- <family>Noto Sans Mono CJK KR</family>
- <default>
- <family>monospace</family>
- </default>
- </alias>
-
- <match>
- <test name="lang">
- <string>ko</string>
- </test>
- <test name="family">
- <string>serif</string>
+ <string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Noto Sans CJK KR</string>
</edit>
</match>
- <alias>
- <family>Noto Sans CJK KR</family>
- <default>
- <family>serif</family>
- </default>
- </alias>
-
+ <!-- monospace -->
<match>
<test name="lang">
<string>ko</string>
</test>
<test name="family">
- <string>sans-serif</string>
+ <string>monospace</string>
</test>
<edit name="family" mode="prepend">
- <string>Noto Sans CJK KR</string>
+ <string>Noto Sans Mono CJK KR</string>
</edit>
</match>
-
- <alias>
- <family>Noto Sans CJK KR</family>
- <default>
- <family>sans-serif</family>
- </default>
- </alias>
</fontconfig>
diff --git a/_config/fontconfig/conf.d/41-noto-cjk-sans-sc.conf b/_config/fontconfig/conf.d/65-noto-cjk-zh-cn.conf
index 8b5c682..ae0a20f 100644
--- a/_config/fontconfig/conf.d/41-noto-cjk-sans-sc.conf
+++ b/_config/fontconfig/conf.d/65-noto-cjk-zh-cn.conf
@@ -9,42 +9,13 @@
* Fedora package: google-noto-cjk-fonts
-->
+ <!-- sans-serif -->
<match>
<test name="lang">
<string>zh-cn</string>
</test>
<test name="family">
- <string>monospace</string>
- </test>
- <edit name="family" mode="prepend">
- <string>Noto Sans Mono CJK SC</string>
- </edit>
- </match>
- <match>
- <test name="lang">
- <string>zh-sg</string>
- </test>
- <test name="family">
- <string>monospace</string>
- </test>
- <edit name="family" mode="prepend">
- <string>Noto Sans Mono CJK SC</string>
- </edit>
- </match>
-
- <alias>
- <family>Noto Sans Mono CJK SC</family>
- <default>
- <family>monospace</family>
- </default>
- </alias>
-
- <match>
- <test name="lang">
- <string>zh-cn</string>
- </test>
- <test name="family">
- <string>serif</string>
+ <string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Noto Sans CJK SC</string>
@@ -55,29 +26,23 @@
<string>zh-sg</string>
</test>
<test name="family">
- <string>serif</string>
+ <string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Noto Sans CJK SC</string>
</edit>
</match>
- <alias>
- <family>Noto Sans CJK SC</family>
- <default>
- <family>serif</family>
- </default>
- </alias>
-
+ <!-- monospace -->
<match>
<test name="lang">
<string>zh-cn</string>
</test>
<test name="family">
- <string>sans-serif</string>
+ <string>monospace</string>
</test>
<edit name="family" mode="prepend">
- <string>Noto Sans CJK SC</string>
+ <string>Noto Sans Mono CJK SC</string>
</edit>
</match>
<match>
@@ -85,17 +50,10 @@
<string>zh-sg</string>
</test>
<test name="family">
- <string>sans-serif</string>
+ <string>monospace</string>
</test>
<edit name="family" mode="prepend">
- <string>Noto Sans CJK SC</string>
+ <string>Noto Sans Mono CJK SC</string>
</edit>
</match>
-
- <alias>
- <family>Noto Sans CJK SC</family>
- <default>
- <family>sans-serif</family>
- </default>
- </alias>
</fontconfig>
diff --git a/_config/fontconfig/conf.d/41-noto-cjk-sans-tc.conf b/_config/fontconfig/conf.d/65-noto-cjk-zh-tw.conf
index 2c1a1e2..5df275d 100644
--- a/_config/fontconfig/conf.d/41-noto-cjk-sans-tc.conf
+++ b/_config/fontconfig/conf.d/65-noto-cjk-zh-tw.conf
@@ -9,42 +9,13 @@
* Fedora package: google-noto-cjk-fonts
-->
+ <!-- sans-serif -->
<match>
<test name="lang">
<string>zh-tw</string>
</test>
<test name="family">
- <string>monospace</string>
- </test>
- <edit name="family" mode="prepend">
- <string>Noto Sans Mono CJK TC</string>
- </edit>
- </match>
- <match>
- <test name="lang">
- <string>zh-hk</string>
- </test>
- <test name="family">
- <string>monospace</string>
- </test>
- <edit name="family" mode="prepend">
- <string>Noto Sans Mono CJK TC</string>
- </edit>
- </match>
-
- <alias>
- <family>Noto Sans Mono CJK TC</family>
- <default>
- <family>monospace</family>
- </default>
- </alias>
-
- <match>
- <test name="lang">
- <string>zh-tw</string>
- </test>
- <test name="family">
- <string>serif</string>
+ <string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Noto Sans CJK TC</string>
@@ -55,29 +26,23 @@
<string>zh-hk</string>
</test>
<test name="family">
- <string>serif</string>
+ <string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Noto Sans CJK TC</string>
</edit>
</match>
- <alias>
- <family>Noto Sans CJK TC</family>
- <default>
- <family>serif</family>
- </default>
- </alias>
-
+ <!-- monospace -->
<match>
<test name="lang">
<string>zh-tw</string>
</test>
<test name="family">
- <string>sans-serif</string>
+ <string>monospace</string>
</test>
<edit name="family" mode="prepend">
- <string>Noto Sans CJK TC</string>
+ <string>Noto Sans Mono CJK TC</string>
</edit>
</match>
<match>
@@ -85,17 +50,10 @@
<string>zh-hk</string>
</test>
<test name="family">
- <string>sans-serif</string>
+ <string>monospace</string>
</test>
<edit name="family" mode="prepend">
- <string>Noto Sans CJK TC</string>
+ <string>Noto Sans Mono CJK TC</string>
</edit>
</match>
-
- <alias>
- <family>Noto Sans CJK TC</family>
- <default>
- <family>sans-serif</family>
- </default>
- </alias>
</fontconfig>
diff --git a/_config/fontconfig/conf.d/40-noto-cursive.conf b/_config/fontconfig/conf.d/66-noto-cursive.conf
index 173087a..173087a 100644
--- a/_config/fontconfig/conf.d/40-noto-cursive.conf
+++ b/_config/fontconfig/conf.d/66-noto-cursive.conf
diff --git a/_config/fontconfig/conf.d/40-noto-fantasy.conf b/_config/fontconfig/conf.d/66-noto-fantasy.conf
index 30e56a7..30e56a7 100644
--- a/_config/fontconfig/conf.d/40-noto-fantasy.conf
+++ b/_config/fontconfig/conf.d/66-noto-fantasy.conf
diff --git a/_config/fontconfig/conf.d/40-noto-mono.conf b/_config/fontconfig/conf.d/66-noto-mono.conf
index a34b98a..a34b98a 100644
--- a/_config/fontconfig/conf.d/40-noto-mono.conf
+++ b/_config/fontconfig/conf.d/66-noto-mono.conf
diff --git a/_config/fontconfig/conf.d/40-noto-sans.conf b/_config/fontconfig/conf.d/66-noto-sans.conf
index 3bfdf21..3bfdf21 100644
--- a/_config/fontconfig/conf.d/40-noto-sans.conf
+++ b/_config/fontconfig/conf.d/66-noto-sans.conf
diff --git a/_config/fontconfig/conf.d/40-noto-serif.conf b/_config/fontconfig/conf.d/66-noto-serif.conf
index 6cd2a73..6cd2a73 100644
--- a/_config/fontconfig/conf.d/40-noto-serif.conf
+++ b/_config/fontconfig/conf.d/66-noto-serif.conf