45 import java.util.NoSuchElementException; |
45 import java.util.NoSuchElementException; |
46 import java.util.StringTokenizer; |
46 import java.util.StringTokenizer; |
47 import java.util.TreeMap; |
47 import java.util.TreeMap; |
48 import java.util.Vector; |
48 import java.util.Vector; |
49 import java.util.concurrent.ConcurrentHashMap; |
49 import java.util.concurrent.ConcurrentHashMap; |
50 import java.util.logging.Level; |
|
51 import java.util.logging.Logger; |
|
52 |
50 |
53 import javax.swing.plaf.FontUIResource; |
51 import javax.swing.plaf.FontUIResource; |
54 import sun.awt.AppContext; |
52 import sun.awt.AppContext; |
55 import sun.awt.FontConfiguration; |
53 import sun.awt.FontConfiguration; |
56 import sun.awt.SunToolkit; |
54 import sun.awt.SunToolkit; |
57 import sun.java2d.FontSupport; |
55 import sun.java2d.FontSupport; |
|
56 import sun.util.logging.PlatformLogger; |
58 |
57 |
59 /** |
58 /** |
60 * The base implementation of the {@link FontManager} interface. It implements |
59 * The base implementation of the {@link FontManager} interface. It implements |
61 * the platform independent, shared parts of OpenJDK's FontManager |
60 * the platform independent, shared parts of OpenJDK's FontManager |
62 * implementations. The platform specific parts are declared as abstract |
61 * implementations. The platform specific parts are declared as abstract |
471 dbgFontPath.substring("append:".length()); |
470 dbgFontPath.substring("append:".length()); |
472 } |
471 } |
473 } |
472 } |
474 |
473 |
475 if (FontUtilities.debugFonts()) { |
474 if (FontUtilities.debugFonts()) { |
476 Logger logger = FontUtilities.getLogger(); |
475 PlatformLogger logger = FontUtilities.getLogger(); |
477 logger.info("JRE font directory: " + jreFontDirName); |
476 logger.info("JRE font directory: " + jreFontDirName); |
478 logger.info("Extra font path: " + extraFontPath); |
477 logger.info("Extra font path: " + extraFontPath); |
479 logger.info("Debug font path: " + dbgFontPath); |
478 logger.info("Debug font path: " + dbgFontPath); |
480 } |
479 } |
481 |
480 |
1613 } |
1612 } |
1614 return fontToFileMap; |
1613 return fontToFileMap; |
1615 } |
1614 } |
1616 |
1615 |
1617 private void logPlatformFontInfo() { |
1616 private void logPlatformFontInfo() { |
1618 Logger logger = FontUtilities.getLogger(); |
1617 PlatformLogger logger = FontUtilities.getLogger(); |
1619 for (int i=0; i< pathDirs.length;i++) { |
1618 for (int i=0; i< pathDirs.length;i++) { |
1620 logger.info("fontdir="+pathDirs[i]); |
1619 logger.info("fontdir="+pathDirs[i]); |
1621 } |
1620 } |
1622 for (String keyName : fontToFileMap.keySet()) { |
1621 for (String keyName : fontToFileMap.keySet()) { |
1623 logger.info("font="+keyName+" file="+ fontToFileMap.get(keyName)); |
1622 logger.info("font="+keyName+" file="+ fontToFileMap.get(keyName)); |
2995 } |
2994 } |
2996 |
2995 |
2997 registeredFontFiles.add(fullName); |
2996 registeredFontFiles.add(fullName); |
2998 |
2997 |
2999 if (FontUtilities.debugFonts() |
2998 if (FontUtilities.debugFonts() |
3000 && FontUtilities.getLogger().isLoggable(Level.INFO)) { |
2999 && FontUtilities.getLogger().isLoggable(PlatformLogger.INFO)) { |
3001 String message = "Registering font " + fullName; |
3000 String message = "Registering font " + fullName; |
3002 String[] natNames = getNativeNames(fullName, null); |
3001 String[] natNames = getNativeNames(fullName, null); |
3003 if (natNames == null) { |
3002 if (natNames == null) { |
3004 message += " with no native name"; |
3003 message += " with no native name"; |
3005 } else { |
3004 } else { |