[Fontconfig] Setting preferred fonts that are not supported by the current locale

Owen Taylor otaylor at redhat.com
Tue Jul 6 04:45:23 EST 2004

On Mon, 2004-07-05 at 12:23, Maarten van Gompel wrote:
> I have a bit of a problem I can't seem to solve.. I want to set an alias
> for Sans that prefers various fonts so the total will display most scripts
> nicely.
> The problem I face now is that I can't seem to get the system to prefer
> fonts that don't support my locale!

This is a known problem with the fontconfig matching algorithm;
fontconfig will sort *all* fonts matching the locale before 
all other fonts, but really once you've found *one* font for
Russian, you want to ignore the language tag.

In Pango, I've handled this reasonably well for many
cases by implementing "language tag refinement" - if Pango
finds a 'ru' language tag on text that is in the Devanagari or
Arabic script it will recognize the mismatch and substitute
a more appropriate language tag (or 'xx' when it doesn't
know anything better.)

In terms of workarounds for non-GTK+/non-Pango programs,
I don't really have a good suggestion. You can configure
your aliases to ignore language tags altogether by using
strong bindings, but this will give you decidely inferior
results when language tags are present (for instance, on
Web pages)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20040705/20a5e45a/attachment.pgp

More information about the Fontconfig mailing list