[Fontconfig] any possible trouble by adding lang to the pattern by default

Akira TAGOH akira at tagoh.org
Mon May 21 21:54:10 PDT 2012

On Tue, May 22, 2012 at 12:14 PM, Keith Packard <keithp at keithp.com> wrote:
> Are you trying to make fontconfig select an appropriate font without any
> language hints at all, based solely on the codepoints within the text?

No, not really. that way takes too much cost to estimate. my
suggestion is simple. the complaint what I've ever seen about this was
it from the users who prefer to see only strings in English. i.e. set
$LANG to any English locale and $LC_CTYPE to the native one say.

So it could be used to guess from it or anything else what languages
they prefer/are expecting to use the font for when any codepoints
conflicts to other languages, and they might obtain the better font by
applying it to the pattern in fontconfig side.

> If so, then what I do myself is to configure a *set* of languages
> instead of a single one in my fontconfig setup. This effectively creates
> a multi-lingual "locale" for the purposes of font selection, guiding
> fontconfig to prefer fonts for my favored languages.

Yes, the concept of the FC_LANG environment variable that I wrote as a
reference from bugzilla in the previous mail is the same with it. and
applying it to the pattern prior to do something with
FcConfigSubstitute() may be a bit aggressive here.


More information about the Fontconfig mailing list