From e4158510bda9f4194cd3884404087af2b5491b6b Mon Sep 17 00:00:00 2001 From: Youngbok Shin Date: Wed, 21 May 2014 10:36:27 +0100 Subject: [PATCH] evas/text: add text ellipsis test case for ligatures special case. Summary: Some fonts has combination information for "ff". When harfbuzz is enabled with the font, evas text ellipsis logic can be broken. Reviewers: tasn, woohyun, cedric Reviewed By: tasn CC: cedric, herdsman Differential Revision: https://phab.enlightenment.org/D870 Some comment/commit message improvements by TAsn. --- src/tests/evas/evas_test_text.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/tests/evas/evas_test_text.c b/src/tests/evas/evas_test_text.c index a113e33a4d..e969050161 100644 --- a/src/tests/evas/evas_test_text.c +++ b/src/tests/evas/evas_test_text.c @@ -189,6 +189,9 @@ _test_ellipsis(Evas_Object *to, const char *buf, const char *font, Evas_Font_Siz evas_object_geometry_get(to, NULL, NULL, &w, NULL); /* If it's gotten way too small, it means we have an issue. */ fail_if(w < 100); + + w = evas_object_text_horiz_advance_get(to); + fail_if(w < 100); } } @@ -218,6 +221,9 @@ START_TEST(evas_text_ellipsis) _test_ellipsis(to, buf, font, size, 0.5); _test_ellipsis(to, buf, font, size, 1.0); + /* Ligatures */ + buf = "Fffffffffffffffffffffffffffffffffff"; + _test_ellipsis(to, buf, font, size, 0.0); END_TEXT_TEST(); } END_TEST