< prev index next >

src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java

Print this page

        

@@ -719,11 +719,18 @@
                 if (info.font2D.useAAForPtSize(info.pixelHeight)) {
                     aahint = SunHints.INTVAL_TEXT_ANTIALIAS_ON;
                 } else {
                     aahint = SunHints.INTVAL_TEXT_ANTIALIAS_OFF;
                 }
-            } else if (aahint >= SunHints.INTVAL_TEXT_ANTIALIAS_LCD_HRGB) {
+            }
+        }
+
+        if  (aahint == SunHints.INTVAL_TEXT_ANTIALIAS_ON && FontUtilities.isMacOSX) {
+            // TODO: check subpixel order
+            aahint = SunHints.INTVAL_TEXT_ANTIALIAS_LCD_HBGR;
+        }
+        if (aahint >= SunHints.INTVAL_TEXT_ANTIALIAS_LCD_HRGB) {
                 /* loops for default rendering modes are installed in the SG2D
                  * constructor. If there are none this will be null.
                  * Not all compositing modes update the render loops, so
                  * we also test that this is a mode we know should support
                  * this. One minor issue is that the loops aren't necessarily

@@ -767,11 +774,10 @@
                     info.lcdSubPixPos =
                         fmhint == SunHints.INTVAL_FRACTIONALMETRICS_ON &&
                         aahint == SunHints.INTVAL_TEXT_ANTIALIAS_LCD_HRGB;
                 }
             }
-        }
         info.aaHint = aahint;
         info.fontStrike = info.font2D.getStrike(font, devAt, textAt,
                                                 aahint, fmhint);
         return info;
     }
< prev index next >