diff options
author | Youngbok Shin <youngb.shin@samsung.com> | 2017-04-23 09:22:42 +0300 |
---|---|---|
committer | Daniel Hirt <hirt.danny@gmail.com> | 2017-04-24 13:32:36 +0300 |
commit | caed13d3fc5d0e4bc7a92da2c77cf1447e8a0d8d (patch) | |
tree | 241b206be32b2e6cc85518a4475f16793f0482f1 /src/lib/evas/common | |
parent | abc2f9b906909be737db82417b233a6ff8063caa (diff) |
evas: round glyph's advance before adding it to pen_x
Summary:
Rounding the sum of glyph's advance could cause inconsistency of
each glyph's positions. When Evas enables Harfbuzz library,
Each glyph's position has to be handled by only nearby glyphs.
But, currently, totally unrelated glyph's advacne could change
other glyphs positions.
ex) 1. "connect."
2. "Tap here to connect."
You can see different gap between "c" and "o" of word "connect".
It should be same even if there was a different text before the word "connect".
@fix
Test Plan: N/A
Reviewers: raster, herdsman, jpeg
Reviewed By: raster
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D4782
Diffstat (limited to 'src/lib/evas/common')
-rw-r--r-- | src/lib/evas/common/evas_font_ot.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/evas/common/evas_font_ot.c b/src/lib/evas/common/evas_font_ot.c index 2ba9d17f45..230abd68eb 100644 --- a/src/lib/evas/common/evas_font_ot.c +++ b/src/lib/evas/common/evas_font_ot.c | |||
@@ -321,8 +321,8 @@ evas_common_font_ot_populate_text_props(const Eina_Unicode *text, | |||
321 | gl_itr->index = infos->codepoint; | 321 | gl_itr->index = infos->codepoint; |
322 | adv = positions->x_advance; | 322 | adv = positions->x_advance; |
323 | 323 | ||
324 | pen_x += adv; | 324 | pen_x += EVAS_FONT_ROUND_26_6_TO_INT(adv); |
325 | gl_itr->pen_after = EVAS_FONT_ROUND_26_6_TO_INT(pen_x); | 325 | gl_itr->pen_after = pen_x; |
326 | 326 | ||
327 | ot_itr++; | 327 | ot_itr++; |
328 | gl_itr++; | 328 | gl_itr++; |