Improving Latin font selection for CJK locales

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



This keeps coming up again and again: CJK users want Pango to choose
Latin fonts differently under a CJK locale than it does under a non-CJK

Making that work is currently impossible in Pango+fontconfig.  The
reason being that Pango passes a Latin "lang" to fontconfig for Latin
runs, and fontconfig and font configurations have no way to
differentiate the Latin in CJK locale from Latin in Latin locale cases.

I'd like to propose adding a new element named "locale" that holds the
original locale language.  Fontconfig needs not know about this at all
except that filling it in in FcDefaultSubstitute() like it does for
"lang".  Then users can write configuration that is sensitive to locale.

Pango then can pass PangoContext language as "locale".  PangoContext
language defaults to the locale, so this is all consistent.

I can do this all in Pango only, but given that I want to encourage CJK
font developer/packagers to write such configuration for their fonts,
would be nice to have it upstreamed.

As an example, one would write:

                <test name="lang">
                <test name="locale">
                <edit name="family" mode="prepend" binding="same">

It could be easier if we could match on scripts instead of languages,
but that's another issue.

Keith, what do you think?


"Those who would give up Essential Liberty to purchase a little
 Temporary Safety, deserve neither Liberty nor Safety."
        -- Benjamin Franklin, 1759

Fontconfig mailing list

[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux