From cf3de4d8f79fc6e8413957cdef034e975343ce30 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 10 Sep 2016 00:22:24 -0700 Subject: [PATCH] [GX] Rename VarStore to VariationStore --- src/hb-ot-layout-common-private.hh | 12 ++++++------ src/hb-ot-layout-gdef-table.hh | 14 +++++++------- src/hb-ot-layout-gpos-table.hh | 2 +- src/hb-ot-layout-gsubgpos-private.hh | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/hb-ot-layout-common-private.hh b/src/hb-ot-layout-common-private.hh index c18e520..c31a197 100644 --- a/src/hb-ot-layout-common-private.hh +++ b/src/hb-ot-layout-common-private.hh @@ -1303,7 +1303,7 @@ struct VarData DEFINE_SIZE_ARRAY2 (6, regionIndices, bytesX); }; -struct VarStore +struct VariationStore { inline float get_delta (unsigned int outer, unsigned int inner, int *coords, unsigned int coord_count) const @@ -1417,10 +1417,10 @@ struct VariationDevice private: - inline hb_position_t get_x_delta (hb_font_t *font, const VarStore &store) const + inline hb_position_t get_x_delta (hb_font_t *font, const VariationStore &store) const { return font->em_scalef_x (get_delta (store, font->x_coords, font->num_coords)); } - inline hb_position_t get_y_delta (hb_font_t *font, const VarStore &store) const + inline hb_position_t get_y_delta (hb_font_t *font, const VariationStore &store) const { return font->em_scalef_y (get_delta (store, font->y_coords, font->num_coords)); } inline bool sanitize (hb_sanitize_context_t *c) const @@ -1431,7 +1431,7 @@ struct VariationDevice private: - inline float get_delta (const VarStore &store, + inline float get_delta (const VariationStore &store, int *coords, unsigned int coord_count) const { return store.get_delta (outerIndex, innerIndex, coords, coord_count); @@ -1458,7 +1458,7 @@ struct DeviceHeader struct Device { - inline hb_position_t get_x_delta (hb_font_t *font, const VarStore &store) const + inline hb_position_t get_x_delta (hb_font_t *font, const VariationStore &store) const { switch (u.b.format) { @@ -1470,7 +1470,7 @@ struct Device return 0; } } - inline hb_position_t get_y_delta (hb_font_t *font, const VarStore &store) const + inline hb_position_t get_y_delta (hb_font_t *font, const VariationStore &store) const { switch (u.b.format) { diff --git a/src/hb-ot-layout-gdef-table.hh b/src/hb-ot-layout-gdef-table.hh index 2a92ece..d85140e 100644 --- a/src/hb-ot-layout-gdef-table.hh +++ b/src/hb-ot-layout-gdef-table.hh @@ -146,7 +146,7 @@ struct CaretValueFormat3 { friend struct CaretValue; - inline hb_position_t get_caret_value (hb_font_t *font, hb_direction_t direction, const VarStore &var_store) const + inline hb_position_t get_caret_value (hb_font_t *font, hb_direction_t direction, const VariationStore &var_store) const { return HB_DIRECTION_IS_HORIZONTAL (direction) ? font->em_scale_x (coordinate) + (this+deviceTable).get_x_delta (font, var_store) : @@ -175,7 +175,7 @@ struct CaretValue inline hb_position_t get_caret_value (hb_font_t *font, hb_direction_t direction, hb_codepoint_t glyph_id, - const VarStore &var_store) const + const VariationStore &var_store) const { switch (u.format) { case 1: return u.format1.get_caret_value (font, direction); @@ -213,7 +213,7 @@ struct LigGlyph inline unsigned int get_lig_carets (hb_font_t *font, hb_direction_t direction, hb_codepoint_t glyph_id, - const VarStore &var_store, + const VariationStore &var_store, unsigned int start_offset, unsigned int *caret_count /* IN/OUT */, hb_position_t *caret_array /* OUT */) const @@ -248,7 +248,7 @@ struct LigCaretList inline unsigned int get_lig_carets (hb_font_t *font, hb_direction_t direction, hb_codepoint_t glyph_id, - const VarStore &var_store, + const VariationStore &var_store, unsigned int start_offset, unsigned int *caret_count /* IN/OUT */, hb_position_t *caret_array /* OUT */) const @@ -381,8 +381,8 @@ struct GDEF { return version.to_int () >= 0x00010002u && (this+markGlyphSetsDef).covers (set_index, glyph_id); } inline bool has_var_store (void) const { return version.to_int () >= 0x00010003u && varStore != 0; } - inline const VarStore &get_var_store (void) const - { return version.to_int () >= 0x00010003u ? this+varStore : Null(VarStore); } + inline const VariationStore &get_var_store (void) const + { return version.to_int () >= 0x00010003u ? this+varStore : Null(VariationStore); } inline bool sanitize (hb_sanitize_context_t *c) const { @@ -444,7 +444,7 @@ struct GDEF * definitions--from beginning of GDEF * header (may be NULL). Introduced * in version 0x00010002. */ - OffsetTo + OffsetTo varStore; /* Offset to the table of Item Variation * Store--from beginning of GDEF * header (may be NULL). Introduced diff --git a/src/hb-ot-layout-gpos-table.hh b/src/hb-ot-layout-gpos-table.hh index dd398f7..0ced5d0 100644 --- a/src/hb-ot-layout-gpos-table.hh +++ b/src/hb-ot-layout-gpos-table.hh @@ -133,7 +133,7 @@ struct ValueFormat : USHORT if (!use_x_device && !use_y_device) return; - const VarStore &store = c->var_store; + const VariationStore &store = c->var_store; /* pixel -> fractional pixel */ if (format & xPlaDevice) { diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh index 1f501c6..5cb6ba7 100644 --- a/src/hb-ot-layout-gsubgpos-private.hh +++ b/src/hb-ot-layout-gsubgpos-private.hh @@ -469,7 +469,7 @@ struct hb_apply_context_t : unsigned int lookup_props; const GDEF &gdef; bool has_glyph_classes; - const VarStore &var_store; + const VariationStore &var_store; skipping_iterator_t iter_input, iter_context; unsigned int lookup_index; unsigned int debug_depth; -- 2.7.4