changeset 3504:646c3cf1ba37

6989370: Windows platform fonts may be incorrectly marked as ineligible for the native rasteriser Reviewed-by: igor, jgodinez
author prr
date Fri, 14 Jan 2011 11:43:36 -0800
parents 987aeabbfda3
children 5cb6bb816a34
files src/share/classes/sun/font/SunFontManager.java src/windows/classes/sun/awt/Win32FontManager.java
diffstat 2 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/font/SunFontManager.java	Fri Jan 14 11:05:59 2011 -0800
+++ b/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/src/windows/classes/sun/awt/Win32FontManager.java	Fri Jan 14 11:05:59 2011 -0800
+++ b/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;