Fix failing the check of prep table in some fonts
This commit is contained in:
parent
80047ed8e8
commit
8c44becd45
|
@ -2608,6 +2608,20 @@ compareulong (const void *a, const void *b)
|
||||||
return *ua - *ub;
|
return *ua - *ub;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static FcBool
|
||||||
|
FindTable (FT_Face face, FT_ULong tabletag)
|
||||||
|
{
|
||||||
|
FT_Stream stream = face->stream;
|
||||||
|
FT_Error error;
|
||||||
|
|
||||||
|
if (!stream)
|
||||||
|
return FcFalse;
|
||||||
|
|
||||||
|
if (( error = ftglue_face_goto_table( face, tabletag, stream ) ))
|
||||||
|
return FcFalse;
|
||||||
|
|
||||||
|
return FcTrue;
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
GetScriptTags(FT_Face face, FT_ULong tabletag, FT_ULong **stags)
|
GetScriptTags(FT_Face face, FT_ULong tabletag, FT_ULong **stags)
|
||||||
|
@ -2746,14 +2760,7 @@ bail:
|
||||||
static FcBool
|
static FcBool
|
||||||
FcFontHasHint (FT_Face face)
|
FcFontHasHint (FT_Face face)
|
||||||
{
|
{
|
||||||
FT_ULong *prep = NULL;
|
return FindTable (face, TTAG_prep);
|
||||||
FT_UShort prep_count = 0;
|
|
||||||
|
|
||||||
prep_count = GetScriptTags (face, TTAG_prep, &prep);
|
|
||||||
|
|
||||||
free (prep);
|
|
||||||
|
|
||||||
return prep_count > 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue