|
|
|
@ -110,9 +110,13 @@ hb_ot_get_glyph_h_advances (hb_font_t* font, void* font_data, |
|
|
|
|
const hb_ot_face_t *ot_face = (const hb_ot_face_t *) font_data; |
|
|
|
|
const OT::hmtx_accelerator_t &hmtx = *ot_face->hmtx; |
|
|
|
|
|
|
|
|
|
#ifndef HB_NO_VAR |
|
|
|
|
const OT::HVARVVAR &HVAR = *hmtx.var_table; |
|
|
|
|
const OT::VariationStore &varStore = &HVAR + HVAR.varStore; |
|
|
|
|
OT::VariationStore::cache_t *cache = font->num_coords ? varStore.create_cache () : nullptr; |
|
|
|
|
#else |
|
|
|
|
OT::VariationStore::cache_t *cache = nullptr; |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
for (unsigned int i = 0; i < count; i++) |
|
|
|
|
{ |
|
|
|
@ -121,7 +125,9 @@ hb_ot_get_glyph_h_advances (hb_font_t* font, void* font_data, |
|
|
|
|
first_advance = &StructAtOffsetUnaligned<hb_position_t> (first_advance, advance_stride); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#ifndef HB_NO_VAR |
|
|
|
|
OT::VariationStore::destroy_cache (cache); |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#ifndef HB_NO_VERTICAL |
|
|
|
@ -139,9 +145,13 @@ hb_ot_get_glyph_v_advances (hb_font_t* font, void* font_data, |
|
|
|
|
|
|
|
|
|
if (vmtx.has_data ()) |
|
|
|
|
{ |
|
|
|
|
#ifndef HB_NO_VAR |
|
|
|
|
const OT::HVARVVAR &VVAR = *vmtx.var_table; |
|
|
|
|
const OT::VariationStore &varStore = &VVAR + VVAR.varStore; |
|
|
|
|
OT::VariationStore::cache_t *cache = font->num_coords ? varStore.create_cache () : nullptr; |
|
|
|
|
#else |
|
|
|
|
OT::VariationStore::cache_t *cache = nullptr; |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
for (unsigned int i = 0; i < count; i++) |
|
|
|
|
{ |
|
|
|
@ -150,7 +160,9 @@ hb_ot_get_glyph_v_advances (hb_font_t* font, void* font_data, |
|
|
|
|
first_advance = &StructAtOffsetUnaligned<hb_position_t> (first_advance, advance_stride); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#ifndef HB_NO_VAR |
|
|
|
|
OT::VariationStore::destroy_cache (cache); |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|