Re: Use english font face names instead of system locale

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

 



[+fontconfig list]

This is re Bug 27765 - FcMatch() returns style in wrong language

  https://bugs.freedesktop.org/show_bug.cgi?id=27765

On 04/05/11 04:30, Ulrich von Zadow wrote:
>>>>> Actually right now fontconfig is buggy and returns the first style name, no
>>>>> matter what language that is. :(  I plan to fix it, but don't have time to
>>>>> spend on fontconfig immediately.  It's somewhere there in fontconfig bugzilla.
[...]
> 
> I'd be glad for any pointers...

This is how I think this should be fixed:

Add a new element FC_NAME_LANG="namelang".

In FcFreeTypeQuery, perhaps set FC_NAME_LANG to the intersection of
FC_FAMILY_LANG and FC_STYLE_LANG.  Or maybe don't.  Not going to use this
directly.

In FcConfigDefault, if FC_NAME_LANG is empty, fill it in from default locale
language.  Then if FC_FAMILY_LANG is empty, copy it from FC_NAME_LANG.  Same
for FC_STYLE_LANG and FC_FULLNAME_LANG.  This way, FC_NAME_LANG is how the
user will request names in a particular language.

In FcFontRenderPrepare, when deciding what FC_FAMILY and FC_STYLE to choose,
choose the first one that has a _LANG equivalent present in the query
pattern's respective _LANG element.

That should do it.

behdad
_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/fontconfig


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

  Powered by Linux