diff --git a/src/hb-object-private.h b/src/hb-object-private.h index 937b1df93..2f5429ffb 100644 --- a/src/hb-object-private.h +++ b/src/hb-object-private.h @@ -62,7 +62,7 @@ typedef struct { #define HB_DEBUG_OBJECT HB_DEBUG+0 #endif -static HB_UNUSED inline hb_bool_t /* always returns TRUE */ +static inline hb_bool_t /* always returns TRUE */ _hb_object_debug_out (const void *obj, hb_reference_count_t *ref_count, const char *function) diff --git a/src/hb-open-file-private.hh b/src/hb-open-file-private.hh index d8992c999..5f13f55cd 100644 --- a/src/hb-open-file-private.hh +++ b/src/hb-open-file-private.hh @@ -193,6 +193,8 @@ struct OpenTypeFontFile static const hb_tag_t CFFTag = HB_TAG ('O','T','T','O'); static const hb_tag_t TrueTypeTag = HB_TAG ( 0 , 1 , 0 , 0 ); static const hb_tag_t TTCTag = HB_TAG ('t','t','c','f'); + static const hb_tag_t TrueTag = HB_TAG ('t','r','u','e'); + static const hb_tag_t Typ1Tag = HB_TAG ('t','y','p','1'); inline hb_tag_t get_tag (void) const { return u.tag; } @@ -200,6 +202,8 @@ struct OpenTypeFontFile { switch (u.tag) { case CFFTag: /* All the non-collection tags */ + case TrueTag: + case Typ1Tag: case TrueTypeTag: return 1; case TTCTag: return u.ttcHeader->get_face_count (); default: return 0; @@ -212,6 +216,8 @@ struct OpenTypeFontFile * Apple dfont container is a container of SFNT's. So each SFNT is a * non-TTC, but the index is more than zero. */ case CFFTag: /* All the non-collection tags */ + case TrueTag: + case Typ1Tag: case TrueTypeTag: return u.fontFace[0]; case TTCTag: return u.ttcHeader->get_face (i); default: return Null(OpenTypeFontFace); @@ -223,6 +229,8 @@ struct OpenTypeFontFile if (!SANITIZE (u.tag)) return false; switch (u.tag) { case CFFTag: /* All the non-collection tags */ + case TrueTag: + case Typ1Tag: case TrueTypeTag: return u.fontFace->sanitize (SANITIZE_ARG); case TTCTag: return u.ttcHeader->sanitize (SANITIZE_ARG); default: return true; diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index df8b0886e..508e67086 100644 --- a/src/hb-open-type-private.hh +++ b/src/hb-open-type-private.hh @@ -168,7 +168,7 @@ _hb_sanitize_fini (hb_sanitize_context_t *context HB_UNUSED, hb_blob_unlock (blob); } -static HB_UNUSED inline bool +static inline bool _hb_sanitize_check (SANITIZE_ARG_DEF, const char *base, unsigned int len) @@ -188,7 +188,7 @@ _hb_sanitize_check (SANITIZE_ARG_DEF, return ret; } -static HB_UNUSED inline bool +static inline bool _hb_sanitize_array (SANITIZE_ARG_DEF, const char *base, unsigned int record_size, @@ -208,7 +208,7 @@ _hb_sanitize_array (SANITIZE_ARG_DEF, return HB_LIKELY (!overflows) && _hb_sanitize_check (SANITIZE_ARG, base, record_size * len); } -static HB_UNUSED inline bool +static inline bool _hb_sanitize_edit (SANITIZE_ARG_DEF, const char *base HB_UNUSED, unsigned int len HB_UNUSED) diff --git a/src/hb-private.h b/src/hb-private.h index 9130b0464..1ee98c730 100644 --- a/src/hb-private.h +++ b/src/hb-private.h @@ -161,7 +161,7 @@ * in libgcc in case a target does not have one, which should be just as * good as the open-coded solution below, (which is "HACKMEM 169"). */ -static HB_UNUSED inline unsigned int +static inline unsigned int _hb_popcount32 (uint32_t mask) { #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) @@ -240,7 +240,7 @@ typedef int hb_mutex_t; #define HB_DEBUG 0 #endif -static HB_UNUSED inline hb_bool_t /* always returns TRUE */ +static inline hb_bool_t /* always returns TRUE */ _hb_trace (const char *what, const char *function, const void *obj,