[Fontconfig] asian font configuration

Tor Andersson tor.andersson at gmail.com
Thu Dec 9 03:23:13 EST 2004

hi keithp and all.

a few issues relating to asian font support in fontconfig.


korean language detection is "broken". only two of all the korean fonts i
have on my system are correctly identified as being korean:

# fc-list ':lang=ko'
Baekmuk Batang:style=Regular
Baekmuk Gulim:style=Regular

all of apples korean fonts that ship with macos x, and even two of
the baekmuk fonts are missing. this needs to be fixed.


the default configuration for fontconfig is a bit on the scarce side
regarding font aliases and substitutions for asian fonts.
please consider incorporating the attached file into the distribution.
exactly which default substitution fonts should be used -- batang or dotum,
mincho or gothic, etc -- should probably be discussed.


i understand that due to the incapability of freetype to use CMaps to
encode CID fonts, the ability to use CID-fonts with fontconfig is severely
limited. however, it would be really really nice if fontconfig were extended
in this area.

i would like to query fontconfig for the location of CMap resource files.
they are font-related and forcing pdf and postscript tools to use a separate
configuration for finding them kinda stinks. 

i think that fontconfig should look at the registry-ordering in the
CID System Info dict and put to good use. add a property FC_CSI and 
put in a corresponding FC_LANG tag for CID-fonts.


-------------- next part --------------
<?xml version="1.0"?>



<!-- Defaults by asian language tag -->

<match target="pattern">
	<test name="lang"><string>zh-TW</string></test>
	<edit name="family" mode="append"><string>AR PL KaitiM Big5</string></edit>

<match target="pattern">
	<test name="lang"><string>zh-CN</string></test>
	<edit name="family" mode="append"><string>AR PL KaitiM GB</string></edit>

<match target="pattern">
	<test name="lang"><string>ja</string></test>
	<edit name="family" mode="append"><string>Kochi Gothic</string></edit>

<match target="pattern">
	<test name="lang"><string>ko</string></test>
	<edit name="family" mode="append"><string>Baekmuk Dotum</string></edit>

<!-- workaround korean lang not being detected correctly ... -->
<match target="pattern">
	<test name="lang"><string>ko</string></test>
	<!-- hmm there is no mode="delete" ... -->
	<edit name="lang" mode="assign"><string>zu</string></edit>

<!-- Traditional Chinese -->

	<accept><family>AR PL Mingti2L Big5</family></accept>

	<accept><family>AR PL KaitiM Big5</family></accept>

<!-- Simplified Chinese -->

	<accept><family>AR PL SungtiL GB</family></accept>

	<accept><family>AR PL KaitiM GB</family></accept>

<!-- Japanese -->

	<accept><family>Hiragino Mincho Pro W3</family></accept>
	<accept><family>Sazanami Mincho</family></accept>
	<accept><family>Kochi Mincho</family></accept>

	<accept><family>Hiragino Kaku Gothic Pro W3</family></accept>
	<accept><family>Sazanami Gothic</family></accept>
	<accept><family>Kochi Gothic</family></accept>

<!-- Korean -->

	<accept><family>Baekmuk Batang</family></accept>

	<accept><family>Baekmuk Gulim</family></accept>

	<accept><family>Baekmuk Dotum</family></accept>


More information about the Fontconfig mailing list