{
for (unsigned int i = 0; i < count; i++)
pos[i].x_advance = c->font->get_glyph_h_advance (info[i].codepoint);
+ /* The nil glyph_h_origin() func returns 0, so no need to apply it. */
if (c->font->has_glyph_h_origin_func ())
for (unsigned int i = 0; i < count; i++)
c->font->subtract_glyph_h_origin (info[i].codepoint,
else
{
for (unsigned int i = 0; i < count; i++)
+ {
pos[i].y_advance = c->font->get_glyph_v_advance (info[i].codepoint);
- if (c->font->has_glyph_v_origin_func ())
- for (unsigned int i = 0; i < count; i++)
- c->font->subtract_glyph_v_origin (info[i].codepoint,
- &pos[i].x_offset,
- &pos[i].y_offset);
+ c->font->subtract_glyph_v_origin (info[i].codepoint,
+ &pos[i].x_offset,
+ &pos[i].y_offset);
+ }
}
if (c->buffer->scratch_flags & HB_BUFFER_SCRATCH_FLAG_HAS_SPACE_FALLBACK)
_hb_ot_shape_fallback_spaces (c->plan, c->font, c->buffer);
/* Change glyph origin to what GPOS expects (horizontal), apply GPOS, change it back. */
+ /* The nil glyph_h_origin() func returns 0, so no need to apply it. */
if (c->font->has_glyph_h_origin_func ())
for (unsigned int i = 0; i < count; i++)
c->font->add_glyph_h_origin (info[i].codepoint,
c->plan->position (c->font, c->buffer);
+ /* The nil glyph_h_origin() func returns 0, so no need to apply it. */
if (c->font->has_glyph_h_origin_func ())
for (unsigned int i = 0; i < count; i++)
c->font->subtract_glyph_h_origin (info[i].codepoint,