aboutsummaryrefslogtreecommitdiffstats
path: root/_config/fontconfig/fonts.conf
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/fontconfig/fonts.conf
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/fontconfig/fonts.conf')
-rw-r--r--_config/fontconfig/fonts.conf126
1 files changed, 0 insertions, 126 deletions
diff --git a/_config/fontconfig/fonts.conf b/_config/fontconfig/fonts.conf
deleted file mode 100644
index a4031e1..0000000
--- a/_config/fontconfig/fonts.conf
+++ /dev/null
@@ -1,126 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
-<fontconfig>
-
- <!--
- Custom font configurations
-
- System-wide location:
- /etc/fonts/local.conf
- User-wide location:
- $XDG_CONFIG_HOME/fontconfig/fonts.conf
- (default: ~/.config/fontconfig/fonts.conf)
-
- 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/
-
-
- Aaron LI
- Created: 2014-04-06
- Updated: 2016-12-05
- -->
-
- <!--
- Set correct common families for custom "serif" and "monospace" fonts,
- otherwise fontconfig assumes any /unrecognized/ font is "sans-serif",
- thus cause *wrong fallback* fonts being found.
- -->
- <!-- "serif" faces -->
- <alias>
- <family>Source Serif Pro</family>
- <default><family>serif</family></default>
- </alias>
- <!-- "monospace" faces -->
- <alias>
- <family>Source Code Pro</family>
- <default><family>monospace</family></default>
- </alias>
- <alias>
- <family>Fira Code</family>
- <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
- match operations needed to substitute one font family for another.
- They contain a <family> element followed by optional <prefer>,
- <accept> and <default> elements.
- -->
- <!-- "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>
- <family>sans-serif</family>
- <prefer>
- <family>Source Sans Pro</family>
- <family>Noto Sans</family>
- </prefer>
- </alias>
- <!-- "monospace" font family -->
- <alias>
- <family>monospace</family>
- <prefer>
- <family>Source Code Pro</family>
- <family>Fira Code</family>
- <family>Noto Mono</family>
- </prefer>
- </alias>
-
- <!-- Substitute Helvetica and Arial -->
- <match>
- <test name="family">
- <string>Helvetica</string>
- </test>
- <edit binding="same" mode="assign" name="family">
- <string>Source Sans Pro</string>
- </edit>
- </match>
- <match>
- <test name="family">
- <string>Arial</string>
- </test>
- <edit binding="same" mode="assign" name="family">
- <string>Source Sans Pro</string>
- </edit>
- </match>
-</fontconfig>