Evas font: fix width query for OT
authorDaniel Hirt <daniel.hirt@samsung.com>
Wed, 13 Jul 2016 11:40:36 +0000 (11:40 +0000)
committerDaniel Hirt <daniel.hirt@samsung.com>
Thu, 14 Jul 2016 12:22:44 +0000 (12:22 +0000)
commitef817f15f0eaec9704ec25d9468c2c8497a5bc13
tree45ab138bdbee9c0ed5ac824d30577d0008798ac9
parente8c396a6e2aae0f9da189930d0c55cd3d2500d58
Evas font: fix width query for OT

Fixes T4068.
Simply querying the last glyph to determine the width of the glyph sequence
won't always work, as OT can have negative offsets (adjusts the placement of a
specific glyph better).

The solution is to calculate the "max width" of some sequence that will
guarantee us proper width results. The worst solution would be to iterate on all
the glyphs and sum up the max width. This is a bit impractical. Instead, we will
inspect just the "cluster" of the last glyph, if one exists.

This should have no performance impact on trivial cases, and very little impact
on the others.

@fix
src/lib/evas/common/evas_font_query.c