Evas font: fixed calling of bidi_end_of_run_get and exposed a new function to get...
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 30 Jan 2011 10:39:35 +0000 (10:39 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 30 Jan 2011 10:39:35 +0000 (10:39 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@56483 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/engines/common/language/evas_language_utils.c
src/lib/engines/common/language/evas_language_utils.h

index 3af42b4..59d9fbc 100644 (file)
@@ -36,8 +36,8 @@ evas_common_language_unicode_funcs_get(void)
    return NULL;
 }
 
-static Evas_Script_Type
-_get_script(Eina_Unicode unicode)
+Evas_Script_Type
+evas_common_language_char_script_get(Eina_Unicode unicode)
 {
 #ifdef USE_HARFBUZZ
    static hb_unicode_funcs_t *funcs;
@@ -62,7 +62,7 @@ evas_common_language_script_end_of_run_get(const Eina_Unicode *str,
         for (i = 0 ; i < len ; i++, str++)
           {
             Evas_Script_Type tmp;
-            tmp = _get_script(*str);
+            tmp = evas_common_language_char_script_get(*str);
             /* Arabic is the first script in the array that's not
              * common/inherited. */
             if ((first == EVAS_SCRIPT_UNKNOWN) && (tmp >= EVAS_SCRIPT_ARABIC))
@@ -78,8 +78,7 @@ evas_common_language_script_end_of_run_get(const Eina_Unicode *str,
 #ifdef BIDI_SUPPORT
           {
              int bidi_end;
-             bidi_end = evas_bidi_end_of_run_get(bidi_props, start,
-                   start + len);
+             bidi_end = evas_bidi_end_of_run_get(bidi_props, start, len);
              if (bidi_end > 0)
                {
                   i = (i < bidi_end) ? i : bidi_end;
@@ -94,7 +93,7 @@ evas_common_language_script_end_of_run_get(const Eina_Unicode *str,
    else
      {
 #ifdef BIDI_SUPPORT
-        return evas_bidi_end_of_run_get(bidi_props, start, start + len);
+        return evas_bidi_end_of_run_get(bidi_props, start, len);
 #endif
      }
    return 0;
@@ -105,7 +104,7 @@ evas_common_language_script_type_get(const Eina_Unicode *str)
 {
    Evas_Script_Type script = EVAS_SCRIPT_COMMON;
    /* Arabic is the first script in the array that's not a common/inherited */
-   for ( ; *str && ((script = _get_script(*str)) < EVAS_SCRIPT_ARABIC) ; str++)
+   for ( ; *str && ((script = evas_common_language_char_script_get(*str)) < EVAS_SCRIPT_ARABIC) ; str++)
      ;
    return script;
 }
index e4958c6..0993fd6 100644 (file)
@@ -119,6 +119,9 @@ evas_common_language_script_end_of_run_get(const Eina_Unicode *str, const Evas_B
 Evas_Script_Type
 evas_common_language_script_type_get(const Eina_Unicode *str);
 
+Evas_Script_Type
+evas_common_language_char_script_get(Eina_Unicode unicode);
+
 const char *
 evas_common_language_from_locale_get(void);