for (i = 0; i < NUM_CODE_PAGE_RANGE; i++)
{
- if (FcLangCompare (lang, FcCodePageRange[i].lang) != FcLangDifferentLang)
+ if (FcLangCompare (lang, FcCodePageRange[i].lang) == FcLangEqual)
return FcTrue;
}
return FcFalse;
FcChar8 *family = 0;
#endif
FcChar8 *complex;
+ FcChar8 *file2;
const FcChar8 *foundry = 0;
int spacing;
TT_OS2 *os2;
printf ("Saving unique fullname %s\n", full);
}
- if (!FcPatternAddString (pat, FC_FILE, (FcChar8 *)basename((char *)FcStrCopy(file))))
+ file2 = FcStrCopy (file);
+ if (!FcPatternAddString (pat, FC_FILE, (FcChar8 *)basename((char *)file2)))
+ {
+ FcStrFree (file2);
goto bail1;
+ }
+ FcStrFree (file2);
FcPatternAddFullFname (pat, (const char *)FcStrCopy (file));
}
#endif
-#if 0
/*
* Skip over PCF fonts that have no encoded characters; they're
* usually just Unicode fonts transcoded to some legacy encoding
+ * ftglue.c forces us to approximate whether a font is a PCF font
+ * or not by whether it has any BDF properties. Try PIXEL_SIZE;
+ * I don't know how to get a list of BDF properties on the font. -PL
*/
if (FcCharSetCount (cs) == 0)
{
- if (!strcmp(FT_MODULE_CLASS(&face->driver->root)->module_name, "pcf"))
+#if HAVE_FT_GET_BDF_PROPERTY
+ if(FT_Get_BDF_Property(face, "PIXEL_SIZE", &prop) == 0)
goto bail2;
- }
#endif
+ }
if (!FcPatternAddCharSet (pat, FC_CHARSET, cs))
goto bail2;
int value;
BDF_PropertyRec prop;
+ /* skip bitmap fonts which do not even have a family name */
+ rc = FT_Get_BDF_Property(face, "FAMILY_NAME", &prop);
+ if (rc != 0 || prop.type != BDF_PROPERTY_TYPE_ATOM)
+ goto bail2;
+
rc = FT_Get_BDF_Property(face, "POINT_SIZE", &prop);
if(rc == 0 && prop.type == BDF_PROPERTY_TYPE_INTEGER)
value = prop.u.integer;