This would be quite similar to FC_LANG, except that it holds the default language of the locale, not the language we are looking for fonts for.
The idea is that an application (Pango) looking for a font to render English always passes en as lang. However, in CJK locales, it may be desirable to select the same font for Latin as well as CJK. With the proposed element, a conf file can check whether FC_LOCALE_LANG is CJK and in that case, add the CJK font as the single preferred font. All this without affecting the case of not running under a CJK locale.
There are some objections to behave like that:
That's opposed to this idea. that may be good if it's configurable with some option but not doing something with the huge rules.
Well, what I'm suggesting by itself doesn't change anything. It just makes it possible for configurations to achieve effects that are currently not possible.
Thanks. maybe current FC_LANG object may causes the confusion. it could be replaced with "script" or something like that. it shouldn't be puzzled by the sets of the language and the territory. though we have to have the mapping table to the language for fonts then. or we could guess the language from the aggregation of the scripts and give a lower score than picking up from the mapping table for fallback.
This is an idea I'm pondering in fontconfig-ng with BCP47 support since it might breaks the backward compatibility.
-- GitLab Migration Automatic Message --
This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/47.