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
This commit is contained in:
Youngbok Shin 2017-04-23 09:22:42 +03:00 committed by Daniel Hirt
parent abc2f9b906
commit caed13d3fc
1 changed files with 2 additions and 2 deletions

View File

@ -321,8 +321,8 @@ evas_common_font_ot_populate_text_props(const Eina_Unicode *text,
gl_itr->index = infos->codepoint;
adv = positions->x_advance;
pen_x += adv;
gl_itr->pen_after = EVAS_FONT_ROUND_26_6_TO_INT(pen_x);
pen_x += EVAS_FONT_ROUND_26_6_TO_INT(adv);
gl_itr->pen_after = pen_x;
ot_itr++;
gl_itr++;