From 2256af3421833945a78503a42b7341f1adf553f9 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Sun, 17 Jun 2012 02:23:49 +0000 Subject: [PATCH] fix gl engine bitmap fonts :) SVN revision: 72256 --- legacy/evas/ChangeLog | 5 +++++ legacy/evas/src/modules/engines/gl_common/evas_gl_font.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/legacy/evas/ChangeLog b/legacy/evas/ChangeLog index 8a211937a4..6bc4c0c2e3 100644 --- a/legacy/evas/ChangeLog +++ b/legacy/evas/ChangeLog @@ -817,3 +817,8 @@ 2012-06-15 Mike Blumenkrantz * evas_object_smart_members_get() now returns NULL on non-smart objects + +2012-04-26 Carsten Haitzler (The Rasterman) + + * Fix GL engine bitmap font handling + diff --git a/legacy/evas/src/modules/engines/gl_common/evas_gl_font.c b/legacy/evas/src/modules/engines/gl_common/evas_gl_font.c index bd20575bf6..26760627a4 100644 --- a/legacy/evas/src/modules/engines/gl_common/evas_gl_font.c +++ b/legacy/evas/src/modules/engines/gl_common/evas_gl_font.c @@ -23,7 +23,8 @@ evas_gl_font_texture_new(void *context, RGBA_Font_Glyph *fg) nw = ((w + 3) / 4) * 4; ndata = alloca(nw *h); if (!ndata) return NULL; - if (fg->glyph_out->bitmap.num_grays == 256) + if ((fg->glyph_out->bitmap.num_grays == 256) && + (fg->glyph_out->bitmap.pixel_mode == FT_PIXEL_MODE_GRAY)) { int x, y; DATA8 *p1, *p2; @@ -40,7 +41,7 @@ evas_gl_font_texture_new(void *context, RGBA_Font_Glyph *fg) } } } - else if (fg->glyph_out->bitmap.num_grays == 0) + else { DATA8 *tmpbuf = NULL, *dp, *tp, bits; int bi, bj, end;