6989370: Windows platform fonts may be incorrectly marked as ineligible for the native rasteriser
authorprr
Fri, 14 Jan 2011 11:43:36 -0800
changeset 7937 3de0a7f48b19
parent 7936 4d5f799d3734
child 7938 970d0e025e57
6989370: Windows platform fonts may be incorrectly marked as ineligible for the native rasteriser Reviewed-by: igor, jgodinez
jdk/src/share/classes/sun/font/SunFontManager.java
jdk/src/windows/classes/sun/awt/Win32FontManager.java
--- a/jdk/src/share/classes/sun/font/SunFontManager.java	Fri Jan 14 11:05:59 2011 -0800
+++ b/jdk/src/share/classes/sun/font/SunFontManager.java	Fri Jan 14 11:43:36 2011 -0800
@@ -1576,7 +1576,7 @@
                                    .info("Trying to resolve file " + fullPath);
                 }
                 do {
-                    ttf = new TrueTypeFont(fullPath, null, fn++, true);
+                    ttf = new TrueTypeFont(fullPath, null, fn++, false);
                     //  prefer the font's locale name.
                     String fontName = ttf.getFontName(l).toLowerCase();
                     if (unmappedFonts.contains(fontName)) {
--- a/jdk/src/windows/classes/sun/awt/Win32FontManager.java	Fri Jan 14 11:05:59 2011 -0800
+++ b/jdk/src/windows/classes/sun/awt/Win32FontManager.java	Fri Jan 14 11:43:36 2011 -0800
@@ -63,7 +63,7 @@
                     if (eudcFile != null) {
                         try {
                             eudcFont = new TrueTypeFont(eudcFile, null, 0,
-                                                        true);
+                                                        false);
                         } catch (FontFormatException e) {
                         }
                     }
@@ -137,6 +137,7 @@
         try {
             while (!found && parser.hasMoreTokens()) {
                 String newPath = parser.nextToken();
+                boolean isJREFont = newPath.equals(jreFontDirName);
                 File theFile = new File(newPath, fontFileName);
                 if (theFile.canRead()) {
                     found = true;
@@ -144,11 +145,11 @@
                     if (defer) {
                         registerDeferredFont(fontFileName, path,
                                              nativeNames,
-                                             fontFormat, true,
+                                             fontFormat, isJREFont,
                                              fontRank);
                     } else {
                         registerFontFile(path, nativeNames,
-                                         fontFormat, true,
+                                         fontFormat, isJREFont,
                                          fontRank);
                     }
                     break;