Evas font-engine: Made *_unicode_funcs_get internal to font_ot.c
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 2 May 2011 09:27:49 +0000 (09:27 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 2 May 2011 09:27:49 +0000 (09:27 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@59107 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

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

index 54812a3..5f37ffe 100644 (file)
@@ -263,7 +263,7 @@ _evas_common_font_ot_hb_get_kerning(hb_font_t *font, hb_face_t *face,
 
 /* End of harfbuzz font funcs */
 
-static hb_font_funcs_t *
+static inline hb_font_funcs_t *
 _evas_common_font_ot_font_funcs_get(void)
 {
    static hb_font_funcs_t *font_funcs = NULL;
@@ -286,6 +286,18 @@ _evas_common_font_ot_font_funcs_get(void)
    return font_funcs;
 }
 
+static inline hb_unicode_funcs_t *
+_evas_common_font_ot_unicode_funcs_get(void)
+{
+   static hb_unicode_funcs_t *unicode_funcs = NULL;
+   if (!unicode_funcs)
+     {
+        unicode_funcs = hb_unicode_funcs_get_default();
+     }
+
+   return unicode_funcs;
+}
+
 static void
 _evas_common_font_ot_shape(hb_buffer_t *buffer, RGBA_Font_Int *fi)
 {
@@ -345,7 +357,7 @@ evas_common_font_ot_populate_text_props(void *_fn, const Eina_Unicode *text,
      }
 
    buffer = hb_buffer_create(slen);
-   hb_buffer_set_unicode_funcs(buffer, evas_common_language_unicode_funcs_get());
+   hb_buffer_set_unicode_funcs(buffer, _evas_common_font_ot_unicode_funcs_get());
    hb_buffer_set_language(buffer, hb_language_from_string(
             evas_common_language_from_locale_get()));
    hb_buffer_set_script(buffer, _evas_script_to_harfbuzz[props->script]);
index 7c7855d..bf48be2 100644 (file)
 
 #include "evas_script_table.h"
 
-/* FIXME: rename and move */
-void *
-evas_common_language_unicode_funcs_get(void)
-{
-#if defined(USE_HARFBUZZ)
-   return hb_unicode_funcs_get_default();
-#endif
-   return NULL;
-}
-
 static Evas_Script_Type
 _evas_common_language_char_script_search(Eina_Unicode unicode)
 {
index 2f0ff6b..fa795ec 100644 (file)
@@ -128,8 +128,5 @@ evas_common_language_char_script_get(Eina_Unicode unicode);
 
 const char *
 evas_common_language_from_locale_get(void);
-
-void *
-evas_common_language_unicode_funcs_get(void);
 #endif