Evas font-engine: Fixed rendering of empty text.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 28 Apr 2011 15:02:11 +0000 (15:02 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 28 Apr 2011 15:02:11 +0000 (15:02 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@59006 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/engines/common/evas_font_draw.c

index 91ef164..c20c921 100644 (file)
@@ -525,14 +525,17 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font
    /* FIXME-tom: Should be applied to non-ot as well once we are capable of
     * doing it */
    fi = text_props->font_instance;
-   evas_common_font_int_reload(fi);
-
-   if (fi->src->current_size != fi->size)
+   if (fi)
      {
-        FTLOCK();
-        FT_Activate_Size(fi->ft.size);
-        FTUNLOCK();
-        fi->src->current_size = fi->size;
+        evas_common_font_int_reload(fi);
+
+        if (fi->src->current_size != fi->size)
+          {
+             FTLOCK();
+             FT_Activate_Size(fi->ft.size);
+             FTUNLOCK();
+             fi->src->current_size = fi->size;
+          }
      }
 #endif
 
@@ -844,14 +847,17 @@ evas_font_word_prerender(RGBA_Draw_Context *dc, const Eina_Unicode *in_text, con
    /* FIXME-tom: Should be applied to non-ot as well once we are capable of
     * doing it */
    fi = text_props->font_instance;
-   evas_common_font_int_reload(fi);
-
-   if (fi->src->current_size != fi->size)
+   if (fi)
      {
-        FTLOCK();
-        FT_Activate_Size(fi->ft.size);
-        FTUNLOCK();
-        fi->src->current_size = fi->size;
+        evas_common_font_int_reload(fi);
+
+        if (fi->src->current_size != fi->size)
+          {
+             FTLOCK();
+             FT_Activate_Size(fi->ft.size);
+             FTUNLOCK();
+             fi->src->current_size = fi->size;
+          }
      }
 #endif