From 04f6a46e90babda87792c1aff9bb6a6dd75bc14c Mon Sep 17 00:00:00 2001 From: tasn Date: Wed, 18 May 2011 13:47:37 +0000 Subject: [PATCH] Evas font-engine: Remove useless if, it's never a bitmap. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@59506 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/engines/common/evas_font_main.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/lib/engines/common/evas_font_main.c b/src/lib/engines/common/evas_font_main.c index 159b0a9..51223be 100644 --- a/src/lib/engines/common/evas_font_main.c +++ b/src/lib/engines/common/evas_font_main.c @@ -389,21 +389,20 @@ evas_common_font_int_cache_glyph_get(RGBA_Font_Int *fi, FT_UInt index) if (fi->fash) _fash_gl_add(fi->fash, index, (void *)(-1)); return NULL; } - if (fg->glyph->format != FT_GLYPH_FORMAT_BITMAP) + + FTLOCK(); + error = FT_Glyph_To_Bitmap(&(fg->glyph), FT_RENDER_MODE_NORMAL, 0, 1); + if (error) { - FTLOCK(); - error = FT_Glyph_To_Bitmap(&(fg->glyph), FT_RENDER_MODE_NORMAL, 0, 1); - if (error) - { - FT_Done_Glyph(fg->glyph); - FTUNLOCK(); - free(fg); - if (!fi->fash) fi->fash = _fash_gl_new(); - if (fi->fash) _fash_gl_add(fi->fash, index, (void *)(-1)); - return NULL; - } + FT_Done_Glyph(fg->glyph); FTUNLOCK(); + free(fg); + if (!fi->fash) fi->fash = _fash_gl_new(); + if (fi->fash) _fash_gl_add(fi->fash, index, (void *)(-1)); + return NULL; } + FTUNLOCK(); + fg->glyph_out = (FT_BitmapGlyph)fg->glyph; fg->index = hindex; fg->fi = fi; -- 2.7.4