Evas font-engine: use the cached fi instead of searching for it.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 26 Apr 2011 09:26:33 +0000 (09:26 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 26 Apr 2011 09:26:33 +0000 (09:26 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@58926 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/engines/common/evas_text_utils.c

index 036e158..2262da1 100644 (file)
@@ -203,10 +203,10 @@ evas_common_text_props_content_create(void *_fn, const Eina_Unicode *text,
 #ifdef OT_SUPPORT
    /* FIXME: as soon as we start caching fi for non-harfbuzz as well, move
     * this (until text_props->fi = fi outside the ifdef */
-   const Eina_Unicode *base_char;
    /* Load the glyph according to the first letter of the script, preety
     * bad, but will have to do */
      {
+        const Eina_Unicode *base_char;
         /* Skip common chars */
         for (base_char = text ;
              *base_char &&
@@ -279,9 +279,7 @@ evas_common_text_props_content_create(void *_fn, const Eina_Unicode *text,
                   /* Update the advance accordingly */
                   adjust_x += (pen_x + (fg->glyph->advance.x >> 16)) -
                      gl_itr->pen_after;
-
-                  /* FIXME: reload fi, a bit slow, but I have no choice. */
-                  evas_common_font_glyph_search(fn, &fi, *base_char);
+                  fi = text_props->font_instance;
                }
              pen_x = gl_itr->pen_after;
           }