diff options
Diffstat (limited to 'src/hb-ot-head-table.hh')
-rw-r--r-- | src/hb-ot-head-table.hh | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/hb-ot-head-table.hh b/src/hb-ot-head-table.hh index 32d64ca..268f133 100644 --- a/src/hb-ot-head-table.hh +++ b/src/hb-ot-head-table.hh @@ -32,6 +32,8 @@ #include "hb-open-type-private.hh" +namespace OT { + /* * head -- Font Header @@ -41,27 +43,29 @@ struct head { - static const hb_tag_t Tag = HB_OT_TAG_head; + static const hb_tag_t tableTag = HB_OT_TAG_head; - inline unsigned int get_upem (void) const { + inline unsigned int get_upem (void) const + { unsigned int upem = unitsPerEm; - /* If no valid head table found, assume 1000, which matches typicaly Type1 usage. */ + /* If no valid head table found, assume 1000, which matches typical Type1 usage. */ return 16 <= upem && upem <= 16384 ? upem : 1000; } - inline bool sanitize (hb_sanitize_context_t *c) { - TRACE_SANITIZE (); + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); return TRACE_RETURN (c->check_struct (this) && likely (version.major == 1)); } - private: + protected: FixedVersion version; /* Version of the head table--currently - * 0x00010000 for version 1.0. */ + * 0x00010000u for version 1.0. */ FixedVersion fontRevision; /* Set by font manufacturer. */ ULONG checkSumAdjustment; /* To compute: set it to 0, sum the * entire font as ULONG, then store - * 0xB1B0AFBA - sum. */ - ULONG magicNumber; /* Set to 0x5F0F3CF5. */ + * 0xB1B0AFBAu - sum. */ + ULONG magicNumber; /* Set to 0x5F0F3CF5u. */ USHORT flags; /* Bit 0: Baseline for font at y=0; * Bit 1: Left sidebearing point at x=0; * Bit 2: Instructions may depend on point size; @@ -141,5 +145,7 @@ struct head }; +} /* namespace OT */ + #endif /* HB_OT_HEAD_TABLE_HH */ |