Create a gist now

Instantly share code, notes, and snippets.

@cryzed /local.conf Secret
Last active Apr 24, 2017

What would you like to do?
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<!-- Replacements from http://bohoomil.com/doc/05-fonts/ (until ibfonts-meta-extended) -->
<alias>
<family>serif</family>
<prefer><family>Heuristica</family></prefer>
</alias>
<alias>
<family>sans-serif</family>
<prefer><family>Noto Sans</family></prefer>
</alias>
<alias>
<family>monospace</family>
<prefer><family>Liberation Mono</family></prefer>
</alias>
<alias>
<family>fantasy</family>
<prefer><family>Signika</family></prefer>
</alias>
<alias>
<family>cursive</family>
<prefer><family>TeX Gyre Chorus</family></prefer>
</alias>
<match>
<test name="family"><string>Arial</string></test>
<edit name="family" mode="assign" binding="strong">
<string>Liberation Sans</string>
</edit>
</match>
<match>
<test name="family"><string>Arial Narrow</string></test>
<edit name="family" mode="assign" binding="strong">
<string>Liberation Sans Narrow</string>
</edit>
</match>
<match>
<test name="family"><string>Book Antiqua</string></test>
<edit name="family" mode="assign" binding="strong">
<string>TeX Gyre Bonum</string>
</edit>
</match>
<match>
<test name="family"><string>Calibri</string></test>
<edit name="family" mode="assign" binding="strong">
<string>Carlito</string>
</edit>
</match>
<match>
<test name="family"><string>Cambria</string></test>
<edit name="family" mode="assign" binding="strong">
<string>Caladea</string>
</edit>
</match>
<match>
<test name="family"><string>New Century Schoolbook</string></test>
<edit name="family" mode="assign" binding="strong">
<string>TeX Gyre Schola</string>
</edit>
</match>
<match>
<test name="family"><string>Comic Sans MS</string></test>
<edit name="family" mode="assign" binding="strong">
<string>Signika</string>
</edit>
</match>
<match>
<test name="family"><string>Consolas</string></test>
<edit name="family" mode="assign" binding="strong">
<string>Droid Sans Mono Slashed</string>
</edit>
</match>
<match>
<test name="family"><string>Constantia</string></test>
<edit name="family" mode="assign" binding="strong">
<string>Merriweather</string>
</edit>
</match>
<match>
<test name="family"><string>Corberl</string></test>
<edit name="family" mode="assign" binding="strong">
<string>Merriweather Sans</string>
</edit>
</match>
<match>
<test name="family"><string>Courier New</string></test>
<edit name="family" mode="assign" binding="strong">
<string>Courier Prime</string>
</edit>
</match>
<match>
<test name="family"><string>Geneva</string></test>
<edit name="family" mode="assign" binding="strong">
<string>Noto Sans</string>
</edit>
</match>
<match>
<test name="family"><string>Georgia</string></test>
<edit name="family" mode="assign" binding="strong">
<string>Gelasio</string>
</edit>
</match>
<match>
<test name="family"><string>Helvetica</string></test>
<edit name="family" mode="assign" binding="strong">
<string>Liberation Sans</string>
</edit>
</match>
<match>
<test name="family"><string>Helvetica Narrow</string></test>
<edit name="family" mode="assign" binding="strong">
<string>Liberation Sans Narrow</string>
</edit>
</match>
<match>
<test name="family"><string>Helvetica Neue</string></test>
<edit name="family" mode="assign" binding="strong">
<string>Open Sans</string>
</edit>
</match>
<match>
<test name="family"><string>Impact</string></test>
<edit name="family" mode="assign" binding="strong">
<string>Oswald</string>
</edit>
</match>
<match>
<test name="family"><string>ITC Zapf Chancery</string></test>
<edit name="family" mode="assign" binding="strong">
<string>TeX Gyre Chorus</string>
</edit>
</match>
<match>
<test name="family"><string>Lucida Calligraphy</string></test>
<edit name="family" mode="assign" binding="strong">
<string>Quintessential</string>
</edit>
</match>
<match>
<test name="family"><string>Lucida Handwriting</string></test>
<edit name="family" mode="assign" binding="strong">
<string>Quintessential</string>
</edit>
</match>
<match>
<test name="family"><string>Lucida Casual</string></test>
<edit name="family" mode="assign" binding="strong">
<string>CantoraOne</string>
</edit>
</match>
<match>
<test name="family"><string>Lucida Console</string></test>
<edit name="family" mode="assign" binding="strong">
<string>Droid Sans Mono</string>
</edit>
</match>
<match>
<test name="family"><string>Lucida Sans Typewriter</string></test>
<edit name="family" mode="assign" binding="strong">
<string>Liberation Sans Mono</string>
</edit>
</match>
<match>
<test name="family"><string>Lucida Fax</string></test>
<edit name="family" mode="assign" binding="strong">
<string>Luxi Mono</string>
</edit>
</match>
<match>
<test name="family"><string>Lucida Sans</string></test>
<edit name="family" mode="assign" binding="strong">
<string>Droid Sans</string>
</edit>
</match>
<match>
<test name="family"><string>Lucida Grande</string></test>
<edit name="family" mode="assign" binding="strong">
<string>Droid Sans</string>
</edit>
</match>
<match>
<test name="family"><string>Palatino Linotype</string></test>
<edit name="family" mode="assign" binding="strong">
<string>TeX Gyre Pagella</string>
</edit>
</match>
<match>
<test name="family"><string>SegoeUI</string></test>
<edit name="family" mode="assign" binding="strong">
<string>WeblySleek UI</string>
</edit>
</match>
<match>
<test name="family"><string>Symbol</string></test>
<edit name="family" mode="assign" binding="strong">
<string>Symbola</string>
</edit>
</match>
<match>
<test name="family"><string>Tahoma</string></test>
<edit name="family" mode="assign" binding="strong">
<string>DejaVu Sans Condensed</string>
</edit>
</match>
<match>
<test name="family"><string>Times New Roman</string></test>
<edit name="family" mode="assign" binding="strong">
<string>Liberation Serif</string>
</edit>
</match>
<match>
<test name="family"><string>Trebuchet MS</string></test>
<edit name="family" mode="assign" binding="strong">
<string>Ubuntu</string>
</edit>
</match>
<match>
<test name="family"><string>Verdana</string></test>
<edit name="family" mode="assign" binding="strong">
<string>DejaVu Sans</string>
</edit>
</match>
<match>
<test name="family"><string>Wingdings</string></test>
<edit name="family" mode="assign" binding="strong">
<string>Symbola</string>
</edit>
</match>
</fontconfig>

QDesjardin commented Jan 15, 2017 edited

The XML declaration at the top needs to have double quotes: <?xml version="1.0"?> -- otherwise the font replacement won't work.

jia-kai commented Jan 28, 2017

For Chinese fonts, enable Noto CJK by adding the following lines may improve display result considerably:

--- local.conf.txt	2017-01-28 22:39:32.796255363 +0800
+++ /etc/fonts/local.conf	2017-01-28 22:30:27.929614934 +0800
@@ -8,11 +8,17 @@
   </alias>
   <alias>
     <family>sans-serif</family>
-    <prefer><family>Noto Sans</family></prefer>
+    <prefer>
+	    <family>Noto Sans</family>
+	    <family>Noto Sans CJK SC</family>
+    </prefer>
   </alias>
   <alias>
     <family>monospace</family>
-    <prefer><family>Liberation Mono</family></prefer>
+    <prefer>
+	    <family>Liberation Mono</family>
+	    <family>Noto Sans Mono CJK SC</family>
+    </prefer>
   </alias>
   <alias>
     <family>fantasy</family>

astaria12 commented Feb 2, 2017 edited

Thanks for the file.
When installing fonts, it gives this error:

Fontconfig error: "local.conf", line 2: XML or text declaration not at start of entity

How can I solve this?
And is the bug critical?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment