From 65cc3b5e2b2181e82836c85ea060b2bd8c59ff49 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 13 Oct 2022 17:11:12 -0600 Subject: [PATCH] [glyf/VarComposite] More --- src/OT/glyf/VarCompositeGlyph.hh | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/OT/glyf/VarCompositeGlyph.hh b/src/OT/glyf/VarCompositeGlyph.hh index aa785ca77..45fe6ec03 100644 --- a/src/OT/glyf/VarCompositeGlyph.hh +++ b/src/OT/glyf/VarCompositeGlyph.hh @@ -29,6 +29,9 @@ struct VarCompositeGlyphRecord }; public: + + static constexpr unsigned NUM_TRANSFORM_POINTS = 9; + unsigned int get_size () const { unsigned int size = min_size; @@ -51,6 +54,21 @@ struct VarCompositeGlyphRecord bool is_use_my_metrics () const { return flags & USE_MY_METRICS; } + hb_codepoint_t get_gid () const + { + return gid; + } + + unsigned get_num_axes () const + { + return num_axes; + } + + unsigned get_num_points () const + { + return num_axes + NUM_TRANSFORM_POINTS; + } + void transform_points (contour_point_vector_t &points) const { float matrix[4]; @@ -163,12 +181,6 @@ struct VarCompositeGlyphRecord translate (matrix, trans, -tCenterX, -tCenterY); } - public: - hb_codepoint_t get_gid () const - { - return gid; - } - protected: HBUINT16 flags; HBGlyphID16 gid;