Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Unified Diff: third_party/harfbuzz-ng/src/hb-graphite2.cc

Issue 1580513002: Roll HarfBuzz to 1.1.3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: build fix Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-graphite2.h ('k') | third_party/harfbuzz-ng/src/hb-icu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/harfbuzz-ng/src/hb-graphite2.cc
diff --git a/third_party/harfbuzz-ng/src/hb-graphite2.cc b/third_party/harfbuzz-ng/src/hb-graphite2.cc
index cd694c140650b854ed75121c4527c639c941e8ff..f41093ae7133a0bb1a94c41ac3a4ac6f22dae43b 100644
--- a/third_party/harfbuzz-ng/src/hb-graphite2.cc
+++ b/third_party/harfbuzz-ng/src/hb-graphite2.cc
@@ -351,6 +351,7 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan,
}
buffer->len = glyph_count;
+ float yscale = font->y_scale / font->x_scale;
/* Positioning. */
if (!HB_DIRECTION_IS_BACKWARD(buffer->props.direction))
{
@@ -359,9 +360,9 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan,
is; pPos++, is = gr_slot_next_in_segment (is))
{
pPos->x_offset = gr_slot_origin_X (is) - curradvx;
- pPos->y_offset = gr_slot_origin_Y (is) - curradvy;
+ pPos->y_offset = gr_slot_origin_Y (is) * yscale - curradvy;
pPos->x_advance = gr_slot_advance_X (is, grface, grfont);
- pPos->y_advance = gr_slot_advance_Y (is, grface, grfont);
+ pPos->y_advance = gr_slot_advance_Y (is, grface, grfont) * yscale;
curradvx += pPos->x_advance;
curradvy += pPos->y_advance;
}
@@ -387,17 +388,17 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan,
for (tis = is, tinfo = info; tis && tinfo->cluster == currclus; tis = gr_slot_prev_in_segment (tis), tinfo--)
{
clusx += gr_slot_advance_X (tis, grface, grfont);
- clusy += gr_slot_advance_Y (tis, grface, grfont);
+ clusy += gr_slot_advance_Y (tis, grface, grfont) * yscale;
}
curradvx += clusx;
curradvy += clusy;
}
pPos->x_advance = gr_slot_advance_X (is, grface, grfont);
- pPos->y_advance = gr_slot_advance_Y (is, grface, grfont);
+ pPos->y_advance = gr_slot_advance_Y (is, grface, grfont) * yscale;
curradvx -= pPos->x_advance;
curradvy -= pPos->y_advance;
pPos->x_offset = gr_slot_origin_X (is) - curradvx;
- pPos->y_offset = gr_slot_origin_Y (is) - curradvy;
+ pPos->y_offset = gr_slot_origin_Y (is) * yscale - curradvy;
}
hb_buffer_reverse_clusters (buffer);
}
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-graphite2.h ('k') | third_party/harfbuzz-ng/src/hb-icu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698