[Fontconfig] Font matching in Unicode locales

John Alexander Thacker thacker at math.cornell.edu
Sun Oct 26 06:39:20 EST 2003


This mailing list is being very slow for me, and I'm seeing the responses
in the online archives long before I'm receiving the emails.  So I'll 
respond now anyway.

First, a problem I noticed when upgrading:  confdir.sgml.in isn't getting
added to the list of files to include in the tarball created by doing 
"make dist".  This causes compilation problems when using said tarball.  
I don't know my way around automake that well, but it seems to me that 
this solves the problem:

--- fontconfig/configure.in     2003-06-26 04:19:10.000000000 -0400
+++ fontconfig-work/configure.in        2003-10-25 15:08:33.000000000 -0400
@@ -390,6 +390,7 @@
 fc-list/Makefile
 fc-match/Makefile
 doc/Makefile
+doc/confdir.sgml
 doc/version.sgml
 test/Makefile
 fontconfig.spec


Thanks for the responses, and I think I have a better idea of how this all
works.  Keith Packard's suggestion of adding this to local.conf:

<!-- set desired language if unset -->
	
	<match target="pattern">
	  <test compare="eq" name="lang" qual="all" >
	   <string>unset</string>
	  </test>
	  <edit name="lang" >
	   <string>en</string>
	   <string>ja</string>
	  </edit>
	 </match>

works perfectly as expected when my locale is unset.  If I do have LANG
set to en_US.UTF-8 there's no change, of course, since fontconfig looks
for languages supporting "en," or possibly "en_US."

I haven't tried Keith's other suggestion, and I haven't been able to
get Owen Taylor's suggestion to change the behavior at all.  If I upgrade
to CVS or 2.2.90 and change Owen's suggestion from

<test compare="eq" name="lang"><string>en</string></test>
...

to

<test compare="contains" name="lang"><string>en</string></test>
...

then applications (gucharmap, gedit, etc.) start preferring to use Kochi 
Gothic and Kochi Mincho for Roman characters as well, over all the the 
English fonts that appear first in "fc-match --sort."  I don't really 
understand why, though.

I'll look into the strong binding suggestion.

John Thacker




More information about the Fontconfig mailing list