diff options
author | Akira TAGOH <akira@tagoh.org> | 2019-07-29 09:38:51 +0000 |
---|---|---|
committer | Akira TAGOH <akira@tagoh.org> | 2019-07-30 11:06:19 +0000 |
commit | 8c44becd452488f79655ff279e36ddf4ebc099ee (patch) | |
tree | 50d4e0e1a53d6f19152062441cf05d5df00f76b8 /src/fcfreetype.c | |
parent | 80047ed8e8b63153ad2014f731453eb47c79c296 (diff) | |
download | fontconfig-8c44becd452488f79655ff279e36ddf4ebc099ee.tar.gz |
Fix failing the check of prep table in some fonts
Diffstat (limited to 'src/fcfreetype.c')
-rw-r--r-- | src/fcfreetype.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/fcfreetype.c b/src/fcfreetype.c index 77c174e..65630c3 100644 --- a/src/fcfreetype.c +++ b/src/fcfreetype.c @@ -2608,6 +2608,20 @@ compareulong (const void *a, const void *b) 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 GetScriptTags(FT_Face face, FT_ULong tabletag, FT_ULong **stags) @@ -2746,14 +2760,7 @@ bail: static FcBool FcFontHasHint (FT_Face face) { - FT_ULong *prep = NULL; - FT_UShort prep_count = 0; - - prep_count = GetScriptTags (face, TTAG_prep, &prep); - - free (prep); - - return prep_count > 0; + return FindTable (face, TTAG_prep); } |