< prev index next >

src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java

Print this page

        

*** 63,78 **** * We should assume ON - or some variation of ON as no GTK desktop * ships with it OFF. */ static Map<Object, Object> aaTextInfo; - /** - * Solaris, or Linux with Sun JDS in a CJK Locale. - * Used to determine if Sun's high quality CJK fonts are present. - */ - private static boolean isSunCJK; - /* * Used to override if system (desktop) text anti-aliasing settings should * be used. The reasons for this are are is that currently its "off" * for CJK locales which is not likely to be a good universal answer, and * also its off for remote display. So this provides an unsupported --- 63,72 ----
*** 105,144 **** /** * Cached theme name. Used by GTKGraphicsUtils */ private static String gtkThemeName = "Default"; - static { - String language = Locale.getDefault().getLanguage(); - boolean cjkLocale = - (Locale.CHINESE.getLanguage().equals(language) || - Locale.JAPANESE.getLanguage().equals(language) || - Locale.KOREAN.getLanguage().equals(language)); - - if (cjkLocale) { - boolean isSunDesktop = false; - switch (OSInfo.getOSType()) { - case SOLARIS: - isSunDesktop = true; - break; - - case LINUX: - Boolean val = AccessController.doPrivileged( - new PrivilegedAction<Boolean>() { - public Boolean run() { - File f = new File("/etc/sun-release"); - return Boolean.valueOf(f.exists()); - } - }); - isSunDesktop = val.booleanValue(); - } - if (isSunDesktop && !sun.java2d.SunGraphicsEnvironment.isOpenSolaris) { - isSunCJK = true; - } - } - } - /** * Returns true if running on system containing at least 2.2. */ static boolean is2_2() { // NOTE: We're currently hard coding to use 2.2. --- 99,108 ----
*** 1472,1494 **** loadStyles(); inInitialize = false; /* * Check if system AA font settings should be used. ! * Sun's JDS (for Linux and Solaris) ships with high quality CJK ! * fonts and specifies via fontconfig that these be rendered in ! * B&W to take advantage of the embedded bitmaps. ! * If is a Sun CJK locale or remote display, indicate by the condition ! * variable that in this case the L&F recommends ignoring desktop ! * settings. On other Unixes (eg Linux) this doesn't apply. ! * REMIND 1: The isSunCJK test is really just a place holder ! * until we can properly query fontconfig and use the properties ! * set for specific fonts. ! * REMIND 2: See comment on isLocalDisplay() definition regarding * XRender. */ ! gtkAAFontSettingsCond = !isSunCJK && SwingUtilities2.isLocalDisplay(); aaTextInfo = new HashMap<>(2); SwingUtilities2.putAATextInfo(gtkAAFontSettingsCond, aaTextInfo); } static ReferenceQueue<GTKLookAndFeel> queue = new ReferenceQueue<GTKLookAndFeel>(); --- 1436,1449 ---- loadStyles(); inInitialize = false; /* * Check if system AA font settings should be used. ! * REMIND: See comment on isLocalDisplay() definition regarding * XRender. */ ! gtkAAFontSettingsCond = SwingUtilities2.isLocalDisplay(); aaTextInfo = new HashMap<>(2); SwingUtilities2.putAATextInfo(gtkAAFontSettingsCond, aaTextInfo); } static ReferenceQueue<GTKLookAndFeel> queue = new ReferenceQueue<GTKLookAndFeel>();
< prev index next >