From 8d30a7a642902bd27520e1952627492c101f8a84 Mon Sep 17 00:00:00 2001 From: Phil Race Date: Fri, 14 Jan 2011 11:43:36 -0800 Subject: [PATCH] 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 | 2 +- jdk/src/windows/classes/sun/awt/Win32FontManager.java | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/jdk/src/share/classes/sun/font/SunFontManager.java b/jdk/src/share/classes/sun/font/SunFontManager.java index 991064e38ae..1ea53c1c204 100644 --- a/jdk/src/share/classes/sun/font/SunFontManager.java +++ b/jdk/src/share/classes/sun/font/SunFontManager.java @@ -1576,7 +1576,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE { .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)) { diff --git a/jdk/src/windows/classes/sun/awt/Win32FontManager.java b/jdk/src/windows/classes/sun/awt/Win32FontManager.java index a6c9e5d8861..5e8eb5ea00f 100644 --- a/jdk/src/windows/classes/sun/awt/Win32FontManager.java +++ b/jdk/src/windows/classes/sun/awt/Win32FontManager.java @@ -63,7 +63,7 @@ public class Win32FontManager extends SunFontManager { if (eudcFile != null) { try { eudcFont = new TrueTypeFont(eudcFile, null, 0, - true); + false); } catch (FontFormatException e) { } } @@ -137,6 +137,7 @@ public class Win32FontManager extends SunFontManager { 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 @@ public class Win32FontManager extends SunFontManager { if (defer) { registerDeferredFont(fontFileName, path, nativeNames, - fontFormat, true, + fontFormat, isJREFont, fontRank); } else { registerFontFile(path, nativeNames, - fontFormat, true, + fontFormat, isJREFont, fontRank); } break;