From: tasn Date: Sun, 30 Jan 2011 10:33:14 +0000 (+0000) Subject: Evas font engine: Added skipping of invisible chars to the font drawing function... X-Git-Tag: submit/trunk/20120815.174732~2106 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9a1728a71eb7c95d9d14d2cbd9b111fb3bb438f1;p=profile%2Fivi%2Fevas.git Evas font engine: Added skipping of invisible chars to the font drawing function - this means we can't draw them until we add a specil "draw inivisble" mode. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@56424 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/engines/common/evas_font_draw.c b/src/lib/engines/common/evas_font_draw.c index 4a4e20b..75214db 100644 --- a/src/lib/engines/common/evas_font_draw.c +++ b/src/lib/engines/common/evas_font_draw.c @@ -5,7 +5,13 @@ #include "evas_bidi_utils.h" /*defines BIDI_SUPPORT if possible */ #include "evas_font_private.h" /* for Frame-Queuing support */ -#define WORD_CACHE_MAXLEN 50 +#define EVAS_FONT_CHARACTER_IS_INVISIBLE(x) ( \ + ((0x200C <= (x)) && ((x) <= 0x200D)) || /* ZWNJ..ZWH */ \ + ((0x200E <= (x)) && ((x) <= 0x200F)) || /* BIDI stuff */ \ + ((0x202A <= (x)) && ((x) <= 0x202E)) /* BIDI stuff */ \ + ) + +#define WORD_CACHE_MAXLEN 50 /* How many to cache */ #define WORD_CACHE_NWORDS 40 static int max_cached_words = WORD_CACHE_NWORDS; @@ -530,6 +536,8 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font int gl, kern; gl = *text; + if (EVAS_FONT_CHARACTER_IS_INVISIBLE(gl)) + continue; index = evas_common_font_glyph_search(fn, &fi, gl); LKL(fi->ft_mutex);