From 9f50447c1dbbc67f05add96fad12c86a282d0ef0 Mon Sep 17 00:00:00 2001 From: WooHyun Jung Date: Mon, 4 May 2020 10:59:33 +0900 Subject: [PATCH] evas_font_query: fixed the wrong arrangement when white-char is on wrapping point Current textblock does not have proper logic for processing line wrapping when - 1. white-char is on wrapping point 2. white-char is drawn with different font from the characters which are before and after it So, this change would follow the old logic which assumes the font for white-character is always cached by the current processing font. After making proper changes in textblock, then this patch can be reverted. @tizen_fix Change-Id: I18f782402dafe64358c9094566ce41f96b8cbb84 --- src/lib/evas/common/evas_font_query.c | 51 +++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/src/lib/evas/common/evas_font_query.c b/src/lib/evas/common/evas_font_query.c index a25c19c..df15503 100644 --- a/src/lib/evas/common/evas_font_query.c +++ b/src/lib/evas/common/evas_font_query.c @@ -2,6 +2,54 @@ #define VAR_SEQ_SAFE(x) (((x).. + * 0020 SPACE + * 0085 + * 00A0 NO-BREAK SPACE + * 1680 OGHAM SPACE MARK + * 180E MONGOLIAN VOWEL SEPARATOR + * 2000..200A EN QUAD..HAIR SPACE + * 2028 LINE SEPARATOR + * 2029 PARAGRAPH SEPARATOR + * 202F NARROW NO-BREAK SPACE + * 205F MEDIUM MATHEMATICAL SPACE + * 3000 IDEOGRAPHIC SPACE + */ + if ( + (c == 0x20) || + ((c >= 0x9) && (c <= 0xd)) || + (c == 0x85) || + (c == 0xa0) || + (c == 0x1680) || + (c == 0x180e) || + ((c >= 0x2000) && (c <= 0x200a)) || + (c == 0x2028) || + (c == 0x2029) || + (c == 0x202f) || + (c == 0x205f) || + (c == 0x3000) + ) + return EINA_TRUE; + return EINA_FALSE; +} +// END // + + /* FIXME: Check coverage according to the font and not by actually loading */ /** * @internal @@ -61,6 +109,9 @@ evas_common_font_query_run_font_end_get(RGBA_Font *fn, RGBA_Font_Int **script_fi * script's font. */ if (!evas_common_get_char_index(fi, *itr, variation_sequence)) break; + // TIZEN_ONLY(20050) : please refer to "wrapping_with_white_char" tag to get details of this code + else if (_is_white(*itr)) continue; + // END if (fi != *script_fi) { -- 2.7.4