From e3cd9f9e06f0f98d652e6d4b15fb6e47f4c4cb9a Mon Sep 17 00:00:00 2001 From: Igor Nekrestyanov Date: Wed, 28 May 2008 20:06:09 +0400 Subject: [PATCH] 6587560: OpenJDK problem handling bitmaps returned when LCD text is requested Reviewed-by: bae, prr --- jdk/src/share/native/sun/font/freetypeScaler.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/jdk/src/share/native/sun/font/freetypeScaler.c b/jdk/src/share/native/sun/font/freetypeScaler.c index a3229df5dd1..5f6385b2868 100644 --- a/jdk/src/share/native/sun/font/freetypeScaler.c +++ b/jdk/src/share/native/sun/font/freetypeScaler.c @@ -770,11 +770,9 @@ Java_sun_font_FreetypeFontScaler_getGlyphImageNative( glyphInfo->topLeftX = (float) ftglyph->bitmap_left; glyphInfo->topLeftY = (float) -ftglyph->bitmap_top; - if (context->aaType == TEXT_AA_LCD_HRGB || - context->aaType == TEXT_AA_LCD_HBGR) { + if (ftglyph->bitmap.pixel_mode == FT_PIXEL_MODE_LCD) { glyphInfo->width = width/3; - } else if (context->aaType == TEXT_AA_LCD_VRGB || - context->aaType == TEXT_AA_LCD_VBGR) { + } else if (ftglyph->bitmap.pixel_mode == FT_PIXEL_MODE_LCD_V) { glyphInfo->height = glyphInfo->height/3; }