Skip to content

Instantly share code, notes, and snippets.

@franziskuskiefer
Forked from heisvoid/gist:3048493
Created July 12, 2013 20:50
Show Gist options
  • Save franziskuskiefer/5987737 to your computer and use it in GitHub Desktop.
Save franziskuskiefer/5987737 to your computer and use it in GitHub Desktop.
<!--?xml version="1.0"?-->
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/fonts.conf file to configure system font access -->
<fontconfig>
<!-- workaround for wrong style and weight in NanumTTF 2.020 -->
<match target="scan">
<test name="fullname" qual="any" compare="eq">
<string>NanumMyeongjoBold</string><string>나눔명조 Bold</string>
<string>NanumGothicBold</string><string>나눔고딕 Bold</string>
</test>
<edit name="style" mode="assign">
<string>Bold</string>
</edit>
<edit name="weight" mode="assign">
<const>bold</const>
</edit>
</match>
<match target="scan">
<test name="fullname" qual="any" compare="eq">
<string>NanumMyeongjoExtraBold</string><string>나눔명조 ExtraBold</string>
<string>NanumGothicExtraBold</string><string>나눔고딕 ExtraBold</string>
</test>
<edit name="style" mode="assign">
<string>ExtraBold</string>
</edit>
<edit name="weight" mode="assign">
<const>extrabold</const>
</edit>
</match>
<!-- fallback of the MS fonts -->
<alias>
<family>Gulim</family><family>굴림</family>
<family>Dotum</family><family>돋움</family>
<prefer><family>NanumGothic</family></prefer>
</alias>
<alias>
<family>Batang</family><family>바탕</family>
<prefer><family>NanumMyeongjo</family></prefer>
</alias>
<!-- specify fallbacks for the missing glyphs, like Hanja. -->
<match target="pattern">
<test name="family" compare="eq">
<string>나눔고딕</string><string>NanumGothic</string>
</test>
<edit name="family" mode="append">
<string>DejaVu Sans</string>
</edit>
</match>
<match target="pattern">
<test name="family" compare="eq">
<string>나눔명조</string><string>NanumMyeongjo</string>
</test>
<edit name="family" mode="append">
<string>DejaVu Serif</string>
</edit>
</match>
<!-- default sans and serif
TODO: it will be moved to fontconfig default configs -->
<match target="pattern">
<test qual="any" name="lang" compare="contains">
<string>ko</string>
</test>
<test qual="any" name="family" compare="eq">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend_first" binding="same">
<string>NanumGothic</string>
</edit>
</match>
<match target="pattern">
<test qual="any" name="lang" compare="contains">
<string>ko</string>
</test>
<test qual="any" name="family" compare="eq">
<string>serif</string>
</test>
<edit name="family" mode="prepend_first" binding="same">
<string>NanumMyeongjo</string>
</edit>
</match>
<match target="pattern">
<edit name="antialias" mode="assign">
<bool>true</bool>
</edit>
</match>
<match target="pattern">
<edit name="hinting" mode="assign">
<bool>true</bool>
</edit>
</match>
<match target="pattern">
<edit name="hintstyle" mode="assign">
<const>hintslight</const>
</edit>
</match>
<match target="pattern">
<edit name="dpi" mode="assign">
<double>96</double>
</edit>
</match>
</fontconfig>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment