evas: Fix Evas Object Text when LTR and RTL are used together.
authorDaniel Zaoui <daniel.zaoui@samsung.com>
Tue, 19 Feb 2013 06:55:40 +0000 (08:55 +0200)
committerDaniel Zaoui <daniel.zaoui@samsung.com>
Tue, 19 Feb 2013 08:05:46 +0000 (10:05 +0200)
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>
ChangeLog
NEWS
src/lib/evas/canvas/evas_object_text.c

index 04815c7..53213c6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-02-19 Daniel Zaoui
+
+        * Fix Evas_Object_Text when LTR and RTL are used in the same paragraph.
+
 2013-02-18  Carsten Haitzler (The Rasterman)
 
         * Fix edje edje_color_class_list() and edje_text_class_list() to
diff --git a/NEWS b/NEWS
index d89f0e1..e381784 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -174,3 +174,4 @@ Fixes:
     * Edje textblock: Improved textblock fit.
     * fix anchor clicked mouse signals for selection-enabled entries
     * Fix edje_color_class_list() and edje_text_class_list() to look at right hashes.
+    * Evas: Fix Evas_Object_Text when LTR and RTL are used in the same paragraph.
index 53a35d8..4e61920 100644 (file)
@@ -722,7 +722,7 @@ _evas_object_text_layout(Evas_Object *eo_obj, Evas_Object_Text *o, Eina_Unicode
         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)
           {