[Fontconfig] any possible trouble by adding lang to the pattern by default
gzjjgod at gmail.com
Wed May 30 04:26:34 PDT 2012
On Wed, May 30, 2012 at 4:47 AM, Akira TAGOH <akira at tagoh.org> wrote:
> On Wed, May 30, 2012 at 7:02 AM, Raimund Steger <rs at mytum.de> wrote:
>> LANG (as opposed to FC_LANG) *is* already used to provide a default value
>> dynamically, provided programs use FcDefaultSubstitute which I think they
>> all do.
>> (BTW- Akira- is there a special reason why applying the new string set
>> needed to be done in FcConfigSubstituteWithPat in addition to
> Well, honestly I don't still even have the reasonable answer for that
> though, FcDefaultSubstitute() seems supposed to call after
> I guess because it may affects too many things on building the
> pattern? Keith or Behdad?
> Anyway, so I did it separately to avoid dirty pattern.
I'm struggling to understand how to I specify a preferred font list for
certain languages. Let's say I want to make sure my preferred order for
"zh" font is like this:
Hiragino Sans GB
Adobe Heiti Std
Droid Sans Fallback
But I do *not* want to specify a hardcoded lang in my FcPattern, I'd
rather have FcDefaultSubstitue() to add the default lang for me based
on current environment. If I specify the preferred zh font list like
<edit name="family" mode="append" binding="same">
<string>Hiragino Sans GB</string>…
then this will happen in FcConfigSubstitute() which is (normally)
earlier than FcDefaultSubstitute(), then I don't get the lang set
So what's the preferred way to do that?
There are similar questions like
More information about the Fontconfig