diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2018-10-11 10:22:01 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2018-10-11 10:22:01 -0400 |
commit | d06c4a867f0d383d8c27f2957e646d9e3fe6853b (patch) | |
tree | e6edd214026eb6f0feaed1e49a2ba30455e3bd0c /src/hb-aat-layout-trak-table.hh | |
parent | 071a2cbcddcbafae9458e674c21db5001b39518d (diff) |
[trak] Only adjust around first glyph
Assumes graphemes only have one base glyph.
Diffstat (limited to 'src/hb-aat-layout-trak-table.hh')
-rw-r--r-- | src/hb-aat-layout-trak-table.hh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/hb-aat-layout-trak-table.hh b/src/hb-aat-layout-trak-table.hh index 71f169c5..dbad449b 100644 --- a/src/hb-aat-layout-trak-table.hh +++ b/src/hb-aat-layout-trak-table.hh @@ -174,24 +174,24 @@ struct trak { const TrackData &trackData = this+horizData; float tracking = trackData.get_tracking (this, ptem); - hb_position_t advance_to_add = c->font->em_scalef_x (tracking / 2); + hb_position_t offset_to_add = c->font->em_scalef_x (tracking / 2); + hb_position_t advance_to_add = c->font->em_scalef_x (tracking); foreach_grapheme (buffer, start, end) { - buffer->pos[start].x_offset += advance_to_add; buffer->pos[start].x_advance += advance_to_add; - buffer->pos[end].x_advance += advance_to_add; + buffer->pos[start].x_offset += offset_to_add; } } else { const TrackData &trackData = this+vertData; float tracking = trackData.get_tracking (this, ptem); - hb_position_t advance_to_add = c->font->em_scalef_y (tracking / 2); + hb_position_t offset_to_add = c->font->em_scalef_y (tracking / 2); + hb_position_t advance_to_add = c->font->em_scalef_y (tracking); foreach_grapheme (buffer, start, end) { - buffer->pos[start].y_offset += advance_to_add; buffer->pos[start].y_advance += advance_to_add; - buffer->pos[end].y_advance += advance_to_add; + buffer->pos[start].y_offset += offset_to_add; } } |