evas: Fix Evas Object Text when LTR and RTL are used together. 17/8917/1
authorDaniel Zaoui <daniel.zaoui@samsung.com>
Sun, 7 Apr 2013 12:52:00 +0000 (15:52 +0300)
committerSungho Kwak <sungho1.kwak@samsung.com>
Tue, 11 Jun 2013 12:15:20 +0000 (21:15 +0900)
When harfbuzz is enabled, RTL text (arabic, hebrew...) is displayed differently
if the paragraph begins with or without LTR.
The problem was related to the function evas_common_language_script_type_get
and a wrong offset given as parameter to this function.

Thanks to EunYoung Kim for having found this bug.

Signed-off-by: Daniel Zaoui <daniel.zaoui@samsung.com>
Change-Id: I9e311e4af3f83709c7efe23408d5df295d670504

ChangeLog
NEWS
src/lib/canvas/evas_object_text.c

index c2f6720..9008fc3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 
         * Fixed pixman image wrapping to handle allocated size instead
         of image size (unless allocated is 0/wrong).
+
+2013-02-19 Daniel Zaoui
+
+        * Fix Evas_Object_Text when LTR and RTL are used in the same
+        paragraph.
diff --git a/NEWS b/NEWS
index 31eba1c..1d550a2 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,7 @@ Additions:
 Fixes:
    * Fix evas textblock tag parser to respect escaped spaces and escaped single quotes
    * Fix the line drawing clipping problem on arm gl driver.
+   * Evas: Fix Evas_Object_Text when LTR and RTL are used in the same paragraph.
 
 Evas 1.7.7
 
index 00d917d..23bddae 100644 (file)
@@ -554,7 +554,7 @@ _evas_object_text_layout(Evas_Object *obj, Evas_Object_Text *o, const Eina_Unico
         if (tmp_cut > 0)
            script_len = tmp_cut;
 
-        script = evas_common_language_script_type_get(text, script_len);
+        script = evas_common_language_script_type_get(text + pos, script_len);
 
         while (script_len > 0)
           {