elementary textpath: improves text rendering quality of curved text
authorYoungbok Shin <youngb.shin@samsung.com>
Fri, 25 May 2018 16:59:01 +0000 (09:59 -0700)
committerWonki Kim <wonki_.kim@samsung.com>
Fri, 1 Jun 2018 03:53:01 +0000 (12:53 +0900)
commit2f27154b3900fc30db5e5bbed2816c94e35a7eaa
treec4019ecf31a0f9c9a5e54bd172cdbb0d84fc8b53
parent3372113ed79ceeb9f919c697eb85bcd29dfd8df0
elementary textpath: improves text rendering quality of curved text

Summary:
There was wrong logic for calculating # of slices, dt, dist of each segment.
It caused bad rendering quality by putting too much slices on small text.

In addition, textpath didn't care about smoothness of curve's slope changing.
The patch fixes to check differences of previous points and next points for Evas Map.
So, textpath can show more smoothly curved text.

Also, it fixes "autofit" bug when text is much huge than given circle's size.

@tix

Test Plan:
- I'll attach screenshots for comparing rendering quality.
- To see "autofit" bug.
1. Run the following command.
   ELM_ACCEL=gl ELM_SCALE=2.0 elementary_test -to "efl.ui.textpath"

2. Toggle "autofit" check box.
3. See the bug case. Textpath can't show all text properly.

Reviewers: raster, cedric, thiepha

Subscribers: #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6195

Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>
src/lib/elementary/efl_ui_textpath.c