forked from enlightenment/efl
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.
This commit is contained in:
parent
02f24d76e1
commit
e4158510bd
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue