From f1fb8c4489f3530badaab6c4f1172f044febc346 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 27 Jun 2022 12:41:46 -0600 Subject: [PATCH] [glyf] Optimize Glyph layout --- src/OT/glyf/Glyph.hh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/OT/glyf/Glyph.hh b/src/OT/glyf/Glyph.hh index 0f7d022e4..365939d9a 100644 --- a/src/OT/glyf/Glyph.hh +++ b/src/OT/glyf/Glyph.hh @@ -208,8 +208,9 @@ struct Glyph hb_bytes_t get_bytes () const { return bytes; } Glyph (hb_bytes_t bytes_ = hb_bytes_t (), - hb_codepoint_t gid_ = (hb_codepoint_t) -1) : bytes (bytes_), gid (gid_), - header (bytes.as ()) + hb_codepoint_t gid_ = (hb_codepoint_t) -1) : bytes (bytes_), + header (bytes.as ()), + gid (gid_) { int num_contours = header->numberOfContours; if (unlikely (num_contours == 0)) type = EMPTY; @@ -219,8 +220,8 @@ struct Glyph protected: hb_bytes_t bytes; - hb_codepoint_t gid; const GlyphHeader *header; + hb_codepoint_t gid; unsigned type; };