[glyf] Optimize Glyph layout
This commit is contained in:
parent
34e3f561b5
commit
f1fb8c4489
|
@ -208,8 +208,9 @@ struct Glyph
|
||||||
hb_bytes_t get_bytes () const { return bytes; }
|
hb_bytes_t get_bytes () const { return bytes; }
|
||||||
|
|
||||||
Glyph (hb_bytes_t bytes_ = hb_bytes_t (),
|
Glyph (hb_bytes_t bytes_ = hb_bytes_t (),
|
||||||
hb_codepoint_t gid_ = (hb_codepoint_t) -1) : bytes (bytes_), gid (gid_),
|
hb_codepoint_t gid_ = (hb_codepoint_t) -1) : bytes (bytes_),
|
||||||
header (bytes.as<GlyphHeader> ())
|
header (bytes.as<GlyphHeader> ()),
|
||||||
|
gid (gid_)
|
||||||
{
|
{
|
||||||
int num_contours = header->numberOfContours;
|
int num_contours = header->numberOfContours;
|
||||||
if (unlikely (num_contours == 0)) type = EMPTY;
|
if (unlikely (num_contours == 0)) type = EMPTY;
|
||||||
|
@ -219,8 +220,8 @@ struct Glyph
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
hb_bytes_t bytes;
|
hb_bytes_t bytes;
|
||||||
hb_codepoint_t gid;
|
|
||||||
const GlyphHeader *header;
|
const GlyphHeader *header;
|
||||||
|
hb_codepoint_t gid;
|
||||||
unsigned type;
|
unsigned type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue