Deokjin Kim
2012-Aug-29 08:59 UTC
[Fontconfig] Can I get language from charset in FcPattern?
Hello all, As I know default lang of FcPattern is derived from system lang, so sometimes it is not matched with charset of FcPattern. If lang of FcPattern is not accurate, it causes meaningless result of font match. Therefore, I want to get valid language from charset in FcPattern. I''ll use language for font match. I can''t find such API in fontconfig.h. Thank you in advance. Best Regards, Deokjin Kim
Akira TAGOH
2012-Aug-29 09:48 UTC
[Fontconfig] Can I get language from charset in FcPattern?
On Wed, Aug 29, 2012 at 5:59 PM, Deokjin Kim <deokjin81.kim at samsung.com> wrote:> Hello all, > > As I know default lang of FcPattern is derived from system lang, so sometimes it is not matched with charset of FcPattern. > If lang of FcPattern is not accurate, it causes meaningless result of font match. > Therefore, I want to get valid language from charset in FcPattern. > I''ll use language for font match.Well, I guess what you want may be FcLangNormalize() that I''ve added since 2.10.0. though it''s an internal API so far. I could make it public in the future if necessary but you can avoid that situation if you use compare="contains" for the lang comparison instead of "eq". -- Akira TAGOH