On 11/25/2009 02:00 AM, Akira TAGOH wrote: > >> The problem with this is that $LANG needs a slight conversion (replacing _ >> with -) before it can be used for FC_LANG. Not sure how to fix that. > > Can't it deal with _ and - similarly in fontconfig, but not replacing > it? is it too much cost than the outcome? > Otherwise I guess you could replace _ with - when it's set something > to the "lang" regardless of the source of the env vars? The problem is the XML parser stuff and much of the rest of fontconfig doesn't case which element it is you are dealing with. They work with types: string, integer, double, .... I'll think about it more. behdad >> While fixing this I also want to fix this bug: >> >> Add a FC_LOCALE_LANG element >> https://bugs.freedesktop.org/show_bug.cgi?id=17311 >> >> """ >> 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. >> """ >> >> That also can be fixed similarly. > > Fantastic. I'd love to see that :) > _______________________________________________ Fontconfig mailing list Fontconfig@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/fontconfig