6587560: OpenJDK problem handling bitmaps returned when LCD text is requested
authorigor
Wed, 28 May 2008 20:06:09 +0400
changeset 881 6aefebba2393
parent 561 977a2ff62fc9
child 882 79d8619aab0b
6587560: OpenJDK problem handling bitmaps returned when LCD text is requested Reviewed-by: bae, prr
jdk/src/share/native/sun/font/freetypeScaler.c
--- a/jdk/src/share/native/sun/font/freetypeScaler.c	Wed May 21 10:59:07 2008 +0400
+++ b/jdk/src/share/native/sun/font/freetypeScaler.c	Wed May 28 20:06:09 2008 +0400
@@ -770,11 +770,9 @@
     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;
     }