+ if(FcPatternGetString(font, FC_FAMILY, 0, (byte **)&family) == FcResultMatch &&
+ FcPatternGetInteger(font, FC_SPACING, 0, &spacing) == FcResultMatch &&
+ FcPatternGetCharSet(font, FC_CHARSET, 0, &charSet) == FcResultMatch)
+ {
+ if(!it.Index(family, true))
+ {
+ it.data =
+ {
+ fixedPitch = spacing == FC_MONO,
+ defaultOrAnsiCharSet =
+ FcCharSetHasChar(charSet, '[') && FcCharSetHasChar(charSet, '{') &&
+ FcCharSetHasChar(charSet, 'a') && FcCharSetHasChar(charSet, 'Z');
+ };
+ }
+ }
+ }
+ }
+ if(pattern) FcPatternDestroy(pattern);
+ if(fontSet) FcFontSetDestroy(fontSet);