Imported Upstream version 1.2.7
[platform/upstream/harfbuzz.git] / src / hb-ot-head-table.hh
index 268f133..9c3e51e 100644 (file)
@@ -55,13 +55,15 @@ struct head
   inline bool sanitize (hb_sanitize_context_t *c) const
   {
     TRACE_SANITIZE (this);
-    return TRACE_RETURN (c->check_struct (this) && likely (version.major == 1));
+    return_trace (c->check_struct (this) &&
+                 version.major == 1 &&
+                 magicNumber == 0x5F0F3CF5u);
   }
 
   protected:
-  FixedVersion version;                /* Version of the head table--currently
+  FixedVersion<>version;               /* Version of the head table--currently
                                         * 0x00010000u for version 1.0. */
-  FixedVersion fontRevision;           /* Set by font manufacturer. */
+  FixedVersion<>fontRevision;          /* Set by font manufacturer. */
   ULONG                checkSumAdjustment;     /* To compute: set it to 0, sum the
                                         * entire font as ULONG, then store
                                         * 0xB1B0AFBAu - sum. */
@@ -138,9 +140,10 @@ struct head
                                         * 2: Like 1 but also contains neutrals;
                                         * -1: Only strongly right to left;
                                         * -2: Like -1 but also contains neutrals. */
+  public:
   SHORT                indexToLocFormat;       /* 0 for short offsets, 1 for long. */
   SHORT                glyphDataFormat;        /* 0 for current format. */
-  public:
+
   DEFINE_SIZE_STATIC (54);
 };