summaryrefslogtreecommitdiff
path: root/extra/openjdk6/aatext_by_default.diff
blob: 268ea99a982e123716838104814a4ad6f1f45526 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
--- openjdk/jdk/src/share/classes/sun/awt/SunToolkit.java.old	2008-01-08 20:23:56.000000000 +0200
+++ openjdk/jdk/src/share/classes/sun/awt/SunToolkit.java	2008-02-24 12:39:19.000000000 +0200
@@ -1875,7 +1875,6 @@
      */
     private static boolean useSystemAAFontSettings() {
         if (!checkedSystemAAFontSettings) {
-            useSystemAAFontSettings = true; /* initially set this true */
             String systemAAFonts = null;
             Toolkit tk = Toolkit.getDefaultToolkit();
             if (tk instanceof SunToolkit) {
@@ -1883,20 +1882,10 @@
                     (String)AccessController.doPrivileged(
                          new GetPropertyAction("awt.useSystemAAFontSettings"));
             }
-            if (systemAAFonts != null) {
-                useSystemAAFontSettings =
-                    Boolean.valueOf(systemAAFonts).booleanValue();
-                /* If it is anything other than "true", then it may be
-                 * a hint name , or it may be "off, "default", etc.
-                 */
-                if (!useSystemAAFontSettings) {
-                    desktopFontHints = getDesktopAAHintsByName(systemAAFonts);
-                }
-            }
-            /* If its still true, apply the extra condition */
-            if (useSystemAAFontSettings) {
-                 useSystemAAFontSettings = lastExtraCondition;
-            }
+            if (systemAAFonts == null || Boolean.parseBoolean(systemAAFonts))
+                systemAAFonts = "on";
+            desktopFontHints = getDesktopAAHintsByName(systemAAFonts);
+            useSystemAAFontSettings = desktopFontHints != null;
             checkedSystemAAFontSettings = true;
         }
         return useSystemAAFontSettings;