[GX] Rename VarStore to VariationStore
This commit is contained in:
parent
1f6ed356e0
commit
cf3de4d8f7
|
@ -1303,7 +1303,7 @@ struct VarData
|
||||||
DEFINE_SIZE_ARRAY2 (6, regionIndices, bytesX);
|
DEFINE_SIZE_ARRAY2 (6, regionIndices, bytesX);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct VarStore
|
struct VariationStore
|
||||||
{
|
{
|
||||||
inline float get_delta (unsigned int outer, unsigned int inner,
|
inline float get_delta (unsigned int outer, unsigned int inner,
|
||||||
int *coords, unsigned int coord_count) const
|
int *coords, unsigned int coord_count) const
|
||||||
|
@ -1417,10 +1417,10 @@ struct VariationDevice
|
||||||
|
|
||||||
private:
|
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)); }
|
{ 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)); }
|
{ return font->em_scalef_y (get_delta (store, font->y_coords, font->num_coords)); }
|
||||||
|
|
||||||
inline bool sanitize (hb_sanitize_context_t *c) const
|
inline bool sanitize (hb_sanitize_context_t *c) const
|
||||||
|
@ -1431,7 +1431,7 @@ struct VariationDevice
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
inline float get_delta (const VarStore &store,
|
inline float get_delta (const VariationStore &store,
|
||||||
int *coords, unsigned int coord_count) const
|
int *coords, unsigned int coord_count) const
|
||||||
{
|
{
|
||||||
return store.get_delta (outerIndex, innerIndex, coords, coord_count);
|
return store.get_delta (outerIndex, innerIndex, coords, coord_count);
|
||||||
|
@ -1458,7 +1458,7 @@ struct DeviceHeader
|
||||||
|
|
||||||
struct Device
|
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)
|
switch (u.b.format)
|
||||||
{
|
{
|
||||||
|
@ -1470,7 +1470,7 @@ struct Device
|
||||||
return 0;
|
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)
|
switch (u.b.format)
|
||||||
{
|
{
|
||||||
|
|
|
@ -146,7 +146,7 @@ struct CaretValueFormat3
|
||||||
{
|
{
|
||||||
friend struct CaretValue;
|
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) ?
|
return HB_DIRECTION_IS_HORIZONTAL (direction) ?
|
||||||
font->em_scale_x (coordinate) + (this+deviceTable).get_x_delta (font, var_store) :
|
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,
|
inline hb_position_t get_caret_value (hb_font_t *font,
|
||||||
hb_direction_t direction,
|
hb_direction_t direction,
|
||||||
hb_codepoint_t glyph_id,
|
hb_codepoint_t glyph_id,
|
||||||
const VarStore &var_store) const
|
const VariationStore &var_store) const
|
||||||
{
|
{
|
||||||
switch (u.format) {
|
switch (u.format) {
|
||||||
case 1: return u.format1.get_caret_value (font, direction);
|
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,
|
inline unsigned int get_lig_carets (hb_font_t *font,
|
||||||
hb_direction_t direction,
|
hb_direction_t direction,
|
||||||
hb_codepoint_t glyph_id,
|
hb_codepoint_t glyph_id,
|
||||||
const VarStore &var_store,
|
const VariationStore &var_store,
|
||||||
unsigned int start_offset,
|
unsigned int start_offset,
|
||||||
unsigned int *caret_count /* IN/OUT */,
|
unsigned int *caret_count /* IN/OUT */,
|
||||||
hb_position_t *caret_array /* OUT */) const
|
hb_position_t *caret_array /* OUT */) const
|
||||||
|
@ -248,7 +248,7 @@ struct LigCaretList
|
||||||
inline unsigned int get_lig_carets (hb_font_t *font,
|
inline unsigned int get_lig_carets (hb_font_t *font,
|
||||||
hb_direction_t direction,
|
hb_direction_t direction,
|
||||||
hb_codepoint_t glyph_id,
|
hb_codepoint_t glyph_id,
|
||||||
const VarStore &var_store,
|
const VariationStore &var_store,
|
||||||
unsigned int start_offset,
|
unsigned int start_offset,
|
||||||
unsigned int *caret_count /* IN/OUT */,
|
unsigned int *caret_count /* IN/OUT */,
|
||||||
hb_position_t *caret_array /* OUT */) const
|
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); }
|
{ 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 bool has_var_store (void) const { return version.to_int () >= 0x00010003u && varStore != 0; }
|
||||||
inline const VarStore &get_var_store (void) const
|
inline const VariationStore &get_var_store (void) const
|
||||||
{ return version.to_int () >= 0x00010003u ? this+varStore : Null(VarStore); }
|
{ return version.to_int () >= 0x00010003u ? this+varStore : Null(VariationStore); }
|
||||||
|
|
||||||
inline bool sanitize (hb_sanitize_context_t *c) const
|
inline bool sanitize (hb_sanitize_context_t *c) const
|
||||||
{
|
{
|
||||||
|
@ -444,7 +444,7 @@ struct GDEF
|
||||||
* definitions--from beginning of GDEF
|
* definitions--from beginning of GDEF
|
||||||
* header (may be NULL). Introduced
|
* header (may be NULL). Introduced
|
||||||
* in version 0x00010002. */
|
* in version 0x00010002. */
|
||||||
OffsetTo<VarStore, ULONG>
|
OffsetTo<VariationStore, ULONG>
|
||||||
varStore; /* Offset to the table of Item Variation
|
varStore; /* Offset to the table of Item Variation
|
||||||
* Store--from beginning of GDEF
|
* Store--from beginning of GDEF
|
||||||
* header (may be NULL). Introduced
|
* header (may be NULL). Introduced
|
||||||
|
|
|
@ -133,7 +133,7 @@ struct ValueFormat : USHORT
|
||||||
|
|
||||||
if (!use_x_device && !use_y_device) return;
|
if (!use_x_device && !use_y_device) return;
|
||||||
|
|
||||||
const VarStore &store = c->var_store;
|
const VariationStore &store = c->var_store;
|
||||||
|
|
||||||
/* pixel -> fractional pixel */
|
/* pixel -> fractional pixel */
|
||||||
if (format & xPlaDevice) {
|
if (format & xPlaDevice) {
|
||||||
|
|
|
@ -469,7 +469,7 @@ struct hb_apply_context_t :
|
||||||
unsigned int lookup_props;
|
unsigned int lookup_props;
|
||||||
const GDEF &gdef;
|
const GDEF &gdef;
|
||||||
bool has_glyph_classes;
|
bool has_glyph_classes;
|
||||||
const VarStore &var_store;
|
const VariationStore &var_store;
|
||||||
skipping_iterator_t iter_input, iter_context;
|
skipping_iterator_t iter_input, iter_context;
|
||||||
unsigned int lookup_index;
|
unsigned int lookup_index;
|
||||||
unsigned int debug_depth;
|
unsigned int debug_depth;
|
||||||
|
|
Loading…
Reference in New Issue