It simply returns the style (and family I guess?) in the first language (in the FcLangSet order?).
Try with "fc-match arial" or "fc-match freesans" for example.
Behdad, what's the progress here? Can I help somehow? Or is it fixed yet -- can I download the patch somewhere?
Not yet. Working on it this week.
(In reply to comment #2)
> Not yet. Working on it this week.
Ok, thanks a lot!
Hi Behdad. Anything new on this?
Not yet, got stuck with harfbuzz hacking. I'll give fontconfig another push soon.
From a mail I sent today:
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
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.
the proposed patch:
updated a bit to add *lang object to the pattern like the original behavior.
I guess we should change the code for FcFontList() too.
updated fclist.c too:
The patch will change the behavior compared to current one. particularly with:
the result on LANG=ja_JP say will looks like:
/usr/share/fonts/wqy-zenhei/wqy-zenhei.ttc: 文泉驛點陣正黑,WenQuanYi Zen Hei Sharp,文泉驿点阵正黑:style=Regular
/usr/share/fonts/wqy-zenhei/wqy-zenhei.ttc: WenQuanYi Zen Hei Sharp,文泉驛點陣正黑,文泉驿点阵正黑:style=Regular
Anyway, that should be trivial.
committed with 7587d1c9.