< prev index next >
src/java.desktop/share/classes/sun/font/SunFontManager.java
Print this page
rev 60064 : 8248802: Add log helper methods to FontUtilities.java
*** 318,328 ****
String name = br.readLine();
if (name == null) {
break;
} else {
if (FontUtilities.debugFonts()) {
! FontUtilities.getLogger().warning("read bad font: " + name);
}
badFonts.add(name);
}
}
} catch (IOException e) {
--- 318,328 ----
String name = br.readLine();
if (name == null) {
break;
} else {
if (FontUtilities.debugFonts()) {
! FontUtilities.logWarning("read bad font: " + name);
}
badFonts.add(name);
}
}
} catch (IOException e) {
*** 352,362 ****
fontConfig = createFontConfiguration();
String[] fontInfo = getDefaultPlatformFont();
defaultFontName = fontInfo[0];
if (defaultFontName == null && FontUtilities.debugFonts()) {
! FontUtilities.getLogger().warning("defaultFontName is null");
}
defaultFontFileName = fontInfo[1];
String extraFontPath = fontConfig.getExtraFontPath();
--- 352,362 ----
fontConfig = createFontConfiguration();
String[] fontInfo = getDefaultPlatformFont();
defaultFontName = fontInfo[0];
if (defaultFontName == null && FontUtilities.debugFonts()) {
! FontUtilities.logWarning("defaultFontName is null");
}
defaultFontFileName = fontInfo[1];
String extraFontPath = fontConfig.getExtraFontPath();
*** 401,414 ****
dbgFontPath.substring("append:".length());
}
}
if (FontUtilities.debugFonts()) {
! PlatformLogger logger = FontUtilities.getLogger();
! logger.info("JRE font directory: " + jreFontDirName);
! logger.info("Extra font path: " + extraFontPath);
! logger.info("Debug font path: " + dbgFontPath);
}
if (dbgFontPath != null) {
/* In debugging mode we register all the paths
* Caution: this is a very expensive call on Solaris:-
--- 401,413 ----
dbgFontPath.substring("append:".length());
}
}
if (FontUtilities.debugFonts()) {
! FontUtilities.logInfo("JRE font directory: " + jreFontDirName);
! FontUtilities.logInfo("Extra font path: " + extraFontPath);
! FontUtilities.logInfo("Debug font path: " + dbgFontPath);
}
if (dbgFontPath != null) {
/* In debugging mode we register all the paths
* Caution: this is a very expensive call on Solaris:-
*** 560,573 ****
}
altNameCache.put(compositeName.toLowerCase(Locale.ENGLISH), cf);
}
private void addCompositeToFontList(CompositeFont f, int rank) {
-
if (FontUtilities.isLogging()) {
! FontUtilities.getLogger().info("Add to Family "+ f.familyName +
! ", Font " + f.fullName + " rank="+rank);
}
f.setRank(rank);
compositeFonts.put(f.fullName, f);
fullNameToFont.put(f.fullName.toLowerCase(Locale.ENGLISH), f);
--- 559,571 ----
}
altNameCache.put(compositeName.toLowerCase(Locale.ENGLISH), cf);
}
private void addCompositeToFontList(CompositeFont f, int rank) {
if (FontUtilities.isLogging()) {
! FontUtilities.logInfo("Add to Family " + f.familyName +
! ", Font " + f.fullName + " rank=" + rank);
}
f.setRank(rank);
compositeFonts.put(f.fullName, f);
fullNameToFont.put(f.fullName.toLowerCase(Locale.ENGLISH), f);
*** 623,634 ****
return null;
}
f.setRank(rank);
if (!physicalFonts.containsKey(fontName)) {
if (FontUtilities.isLogging()) {
! FontUtilities.getLogger().info("Add to Family "+familyName +
! ", Font " + fontName + " rank="+rank);
}
physicalFonts.put(fontName, f);
FontFamily family = FontFamily.getFamily(familyName);
if (family == null) {
family = new FontFamily(familyName, false, rank);
--- 621,632 ----
return null;
}
f.setRank(rank);
if (!physicalFonts.containsKey(fontName)) {
if (FontUtilities.isLogging()) {
! FontUtilities.logInfo("Add to Family " + familyName +
! ", Font " + fontName + " rank=" + rank);
}
physicalFonts.put(fontName, f);
FontFamily family = FontFamily.getFamily(familyName);
if (family == null) {
family = new FontFamily(familyName, false, rank);
*** 697,718 ****
* In other words if we reach here, there's a possible
* problem with our choice of font configuration fonts.
*/
if (oldFont.platName.startsWith(jreFontDirName)) {
if (FontUtilities.isLogging()) {
! FontUtilities.getLogger()
! .warning("Unexpected attempt to replace a JRE " +
! " font " + fontName + " from " +
! oldFont.platName +
" with " + newFont.platName);
}
return oldFont;
}
if (FontUtilities.isLogging()) {
! FontUtilities.getLogger()
! .info("Replace in Family " + familyName +
",Font " + fontName + " new rank="+rank +
" from " + oldFont.platName +
" with " + newFont.platName);
}
replaceFont(oldFont, newFont);
--- 695,713 ----
* In other words if we reach here, there's a possible
* problem with our choice of font configuration fonts.
*/
if (oldFont.platName.startsWith(jreFontDirName)) {
if (FontUtilities.isLogging()) {
! FontUtilities.logWarning("Unexpected attempt to replace a JRE " +
! " font " + fontName + " from " + oldFont.platName +
" with " + newFont.platName);
}
return oldFont;
}
if (FontUtilities.isLogging()) {
! FontUtilities.logInfo("Replace in Family " + familyName +
",Font " + fontName + " new rank="+rank +
" from " + oldFont.platName +
" with " + newFont.platName);
}
replaceFont(oldFont, newFont);
*** 901,912 ****
if (fileNameKey == null) {
return null;
}
if (FontUtilities.isLogging()) {
! FontUtilities.getLogger()
! .info("Opening deferred font file " + fileNameKey);
}
PhysicalFont physicalFont = null;
FontRegistrationInfo regInfo = deferredFontFiles.get(fileNameKey);
if (regInfo != null) {
--- 896,906 ----
if (fileNameKey == null) {
return null;
}
if (FontUtilities.isLogging()) {
! FontUtilities.logInfo("Opening deferred font file " + fileNameKey);
}
PhysicalFont physicalFont = null;
FontRegistrationInfo regInfo = deferredFontFiles.get(fileNameKey);
if (regInfo != null) {
*** 989,1006 ****
break;
default:
}
if (FontUtilities.isLogging()) {
! FontUtilities.getLogger()
! .info("Registered file " + fileName + " as font " +
physicalFont + " rank=" + fontRank);
}
} catch (FontFormatException ffe) {
if (FontUtilities.isLogging()) {
! FontUtilities.getLogger().warning("Unusable font: " +
! fileName + " " + ffe.toString());
}
}
if (physicalFont != null &&
fontFormat != FONTFORMAT_NATIVE) {
registeredFonts.put(fileName, physicalFont);
--- 983,998 ----
break;
default:
}
if (FontUtilities.isLogging()) {
! FontUtilities.logInfo("Registered file " + fileName + " as font " +
physicalFont + " rank=" + fontRank);
}
} catch (FontFormatException ffe) {
if (FontUtilities.isLogging()) {
! FontUtilities.logInfo("Unusable font: " + fileName + " " + ffe.toString());
}
}
if (physicalFont != null &&
fontFormat != FONTFORMAT_NATIVE) {
registeredFonts.put(fileName, physicalFont);
*** 1040,1051 ****
if (font2d != null) {
if (font2d instanceof PhysicalFont) {
defaultPhysicalFont = (PhysicalFont)font2d;
} else {
if (FontUtilities.isLogging()) {
! FontUtilities.getLogger()
! .warning("Font returned by findFont2D for default font name " +
defaultFontName + " is not a physical font: " + font2d.getFontName(null));
}
}
}
if (defaultPhysicalFont == null) {
--- 1032,1042 ----
if (font2d != null) {
if (font2d instanceof PhysicalFont) {
defaultPhysicalFont = (PhysicalFont)font2d;
} else {
if (FontUtilities.isLogging()) {
! FontUtilities.logWarning("Font returned by findFont2D for default font name " +
defaultFontName + " is not a physical font: " + font2d.getFontName(null));
}
}
}
if (defaultPhysicalFont == null) {
*** 1302,1313 ****
}
}
}
fontToFamilyNameMap.remove(name);
if (FontUtilities.isLogging()) {
! FontUtilities.getLogger()
! .info("No file for font:" + name);
}
}
}
}
}
--- 1293,1303 ----
}
}
}
fontToFamilyNameMap.remove(name);
if (FontUtilities.isLogging()) {
! FontUtilities.logInfo("No file for font:" + name);
}
}
}
}
}
*** 1353,1364 ****
HashMap<String,ArrayList<String>> familyToFontListMap2 = null;;
for (String pathFile : getFontFilesFromPath(false)) {
if (!registryFiles.contains(pathFile)) {
if (FontUtilities.isLogging()) {
! FontUtilities.getLogger()
! .info("Found non-registry file : " + pathFile);
}
PhysicalFont f = registerFontFile(getPathName(pathFile));
if (f == null) {
continue;
}
--- 1343,1353 ----
HashMap<String,ArrayList<String>> familyToFontListMap2 = null;;
for (String pathFile : getFontFilesFromPath(false)) {
if (!registryFiles.contains(pathFile)) {
if (FontUtilities.isLogging()) {
! FontUtilities.logInfo("Found non-registry file : " + pathFile);
}
PhysicalFont f = registerFontFile(getPathName(pathFile));
if (f == null) {
continue;
}
*** 1398,1420 ****
try {
int fn = 0;
TrueTypeFont ttf;
String fullPath = getPathName(file);
if (FontUtilities.isLogging()) {
! FontUtilities.getLogger()
! .info("Trying to resolve file " + fullPath);
}
do {
ttf = new TrueTypeFont(fullPath, null, fn++, false);
// prefer the font's locale name.
String fontName = ttf.getFontName(l).toLowerCase();
if (unmappedFonts.contains(fontName)) {
fontToFileMap.put(fontName, file);
unmappedFonts.remove(fontName);
if (FontUtilities.isLogging()) {
! FontUtilities.getLogger()
! .info("Resolved absent registry entry for " +
fontName + " located in " + fullPath);
}
}
}
while (fn < ttf.getFontCount());
--- 1387,1407 ----
try {
int fn = 0;
TrueTypeFont ttf;
String fullPath = getPathName(file);
if (FontUtilities.isLogging()) {
! FontUtilities.logInfo("Trying to resolve file " + fullPath);
}
do {
ttf = new TrueTypeFont(fullPath, null, fn++, false);
// prefer the font's locale name.
String fontName = ttf.getFontName(l).toLowerCase();
if (unmappedFonts.contains(fontName)) {
fontToFileMap.put(fontName, file);
unmappedFonts.remove(fontName);
if (FontUtilities.isLogging()) {
! FontUtilities.logInfo("Resolved absent registry entry for " +
fontName + " located in " + fullPath);
}
}
}
while (fn < ttf.getFontCount());
*** 1536,1547 ****
}
}
if (failure) {
if (FontUtilities.isLogging()) {
! FontUtilities.getLogger().
! info("Hardcoded file missing looking for " + lcName);
}
platformFontMap.remove(firstWord);
return null;
}
--- 1523,1533 ----
}
}
if (failure) {
if (FontUtilities.isLogging()) {
! FontUtilities.logInfo("Hardcoded file missing looking for " + lcName);
}
platformFontMap.remove(firstWord);
return null;
}
*** 1564,1575 ****
}
});
if (failure) {
if (FontUtilities.isLogging()) {
! FontUtilities.getLogger().
! info("Hardcoded file missing looking for " + lcName);
}
platformFontMap.remove(firstWord);
return null;
}
--- 1550,1560 ----
}
});
if (failure) {
if (FontUtilities.isLogging()) {
! FontUtilities.logInfo("Hardcoded file missing looking for " + lcName);
}
platformFontMap.remove(firstWord);
return null;
}
*** 1832,1843 ****
for (int f=0;f<fontList.length;f++) {
String fontNameLC = fontList[f].toLowerCase(Locale.ENGLISH);
String fileName = fontToFileMap.get(fontNameLC);
if (fileName == null) {
if (FontUtilities.isLogging()) {
! FontUtilities.getLogger()
! .info("Platform lookup : No file for font " +
fontList[f] + " in family " +familyName);
}
return null;
}
}
--- 1817,1827 ----
for (int f=0;f<fontList.length;f++) {
String fontNameLC = fontList[f].toLowerCase(Locale.ENGLISH);
String fileName = fontToFileMap.get(fontNameLC);
if (fileName == null) {
if (FontUtilities.isLogging()) {
! FontUtilities.logInfo("Platform lookup : No file for font " +
fontList[f] + " in family " +familyName);
}
return null;
}
}
*** 1903,1915 ****
*/
Font2D font = fontNameCache.get(mapName);
if (font != null) {
return font;
}
-
if (FontUtilities.isLogging()) {
! FontUtilities.getLogger().info("Search for font: " + name);
}
// The check below is just so that the bitmap fonts being set by
// AWT and Swing thru the desktop properties do not trigger the
// the load fonts case. The two bitmap fonts are now mapped to
--- 1887,1898 ----
*/
Font2D font = fontNameCache.get(mapName);
if (font != null) {
return font;
}
if (FontUtilities.isLogging()) {
! FontUtilities.logInfo("Search for font: " + name);
}
// The check below is just so that the bitmap fonts being set by
// AWT and Swing thru the desktop properties do not trigger the
// the load fonts case. The two bitmap fonts are now mapped to
*** 2019,2031 ****
if (FontUtilities.isWindows) {
font = findFontFromPlatformMap(lowerCaseName, style);
if (FontUtilities.isLogging()) {
! FontUtilities.getLogger()
! .info("findFontFromPlatformMap returned " + font);
}
if (font != null) {
fontNameCache.put(mapName, font);
return font;
}
/* Don't want Windows to return a font from C:\Windows\Fonts
--- 2002,2014 ----
if (FontUtilities.isWindows) {
font = findFontFromPlatformMap(lowerCaseName, style);
if (FontUtilities.isLogging()) {
! FontUtilities.logInfo("findFontFromPlatformMap returned " + font);
}
+
if (font != null) {
fontNameCache.put(mapName, font);
return font;
}
/* Don't want Windows to return a font from C:\Windows\Fonts
*** 2040,2051 ****
}
}
font = findFontFromPlatform(lowerCaseName, style);
if (font != null) {
if (FontUtilities.isLogging()) {
! FontUtilities.getLogger()
! .info("Found font via platform API for request:\"" +
name + "\":, style="+style+
" found font: " + font);
}
fontNameCache.put(mapName, font);
return font;
--- 2023,2033 ----
}
}
font = findFontFromPlatform(lowerCaseName, style);
if (font != null) {
if (FontUtilities.isLogging()) {
! FontUtilities.logInfo("Found font via platform API for request:\"" +
name + "\":, style="+style+
" found font: " + font);
}
fontNameCache.put(mapName, font);
return font;
*** 2114,2135 ****
/* If reach here and no match has been located, then if all fonts
* are not yet loaded, do so, and then recurse.
*/
if (!loadedAllFonts) {
if (FontUtilities.isLogging()) {
! FontUtilities.getLogger()
! .info("Load fonts looking for:" + name);
}
loadFonts();
loadedAllFonts = true;
return findFont2D(name, style, fallback);
}
if (!loadedAllFontFiles) {
if (FontUtilities.isLogging()) {
! FontUtilities.getLogger()
! .info("Load font files looking for:" + name);
}
loadFontFiles();
loadedAllFontFiles = true;
return findFont2D(name, style, fallback);
}
--- 2096,2115 ----
/* If reach here and no match has been located, then if all fonts
* are not yet loaded, do so, and then recurse.
*/
if (!loadedAllFonts) {
if (FontUtilities.isLogging()) {
! FontUtilities.logInfo("Load fonts looking for:" + name);
}
loadFonts();
loadedAllFonts = true;
return findFont2D(name, style, fallback);
}
if (!loadedAllFontFiles) {
if (FontUtilities.isLogging()) {
! FontUtilities.logInfo("Load font files looking for:" + name);
}
loadFontFiles();
loadedAllFontFiles = true;
return findFont2D(name, style, fallback);
}
*** 2183,2195 ****
} else if (lowerCaseName.equals("courier")) {
font = findFont2D("monospaced", style, fallback);
fontNameCache.put(mapName, font);
return font;
}
-
if (FontUtilities.isLogging()) {
! FontUtilities.getLogger().info("No font found for:" + name);
}
switch (fallback) {
case PHYSICAL_FALLBACK: return getDefaultPhysicalFont();
case LOGICAL_FALLBACK: return getDefaultLogicalFont(style);
--- 2163,2174 ----
} else if (lowerCaseName.equals("courier")) {
font = findFont2D("monospaced", style, fallback);
fontNameCache.put(mapName, font);
return font;
}
if (FontUtilities.isLogging()) {
! FontUtilities.logInfo("No font found for:" + name);
}
switch (fallback) {
case PHYSICAL_FALLBACK: return getDefaultPhysicalFont();
case LOGICAL_FALLBACK: return getDefaultLogicalFont(style);
*** 2360,2371 ****
if (!(font2D instanceof PhysicalFont)) {
/* We should never reach here, but just in case */
return;
} else {
if (FontUtilities.isLogging()) {
! FontUtilities.getLogger()
! .severe("Deregister bad font: " + font2D);
}
replaceFont((PhysicalFont)font2D, getDefaultPhysicalFont());
}
}
--- 2339,2349 ----
if (!(font2D instanceof PhysicalFont)) {
/* We should never reach here, but just in case */
return;
} else {
if (FontUtilities.isLogging()) {
! FontUtilities.logSevere("Deregister bad font: " + font2D);
}
replaceFont((PhysicalFont)font2D, getDefaultPhysicalFont());
}
}
*** 2384,2407 ****
/* If we try to replace the font with itself, that won't work,
* so pick any alternative physical font
*/
if (oldFont == newFont) {
if (FontUtilities.isLogging()) {
! FontUtilities.getLogger()
! .severe("Can't replace bad font with itself " + oldFont);
}
PhysicalFont[] physFonts = getPhysicalFonts();
for (int i=0; i<physFonts.length;i++) {
if (physFonts[i] != newFont) {
newFont = physFonts[i];
break;
}
}
if (oldFont == newFont) {
if (FontUtilities.isLogging()) {
! FontUtilities.getLogger()
! .severe("This is bad. No good physicalFonts found.");
}
return;
}
}
--- 2362,2383 ----
/* If we try to replace the font with itself, that won't work,
* so pick any alternative physical font
*/
if (oldFont == newFont) {
if (FontUtilities.isLogging()) {
! FontUtilities.logSevere("Can't replace bad font with itself " + oldFont);
}
PhysicalFont[] physFonts = getPhysicalFonts();
for (int i=0; i<physFonts.length;i++) {
if (physFonts[i] != newFont) {
newFont = physFonts[i];
break;
}
}
if (oldFont == newFont) {
if (FontUtilities.isLogging()) {
! FontUtilities.logSevere("This is bad. No good physicalFonts found.");
}
return;
}
}
*** 2498,2511 ****
* almost never used. The main case in which it is called is when
* a bogus font name is used and we need to check all possible names
* before returning the default case.
*/
private Font2D findFont2DAllLocales(String name, int style) {
-
if (FontUtilities.isLogging()) {
! FontUtilities.getLogger()
! .info("Searching localised font names for:" + name);
}
/* If reach here and no match has been located, then if we have
* not yet built the map of localeFullNamesToFont for TT fonts, do so
* now. This method must be called after all fonts have been loaded.
--- 2474,2485 ----
* almost never used. The main case in which it is called is when
* a bogus font name is used and we need to check all possible names
* before returning the default case.
*/
private Font2D findFont2DAllLocales(String name, int style) {
if (FontUtilities.isLogging()) {
! FontUtilities.logInfo("Searching localised font names for:" + name);
}
/* If reach here and no match has been located, then if we have
* not yet built the map of localeFullNamesToFont for TT fonts, do so
* now. This method must be called after all fonts have been loaded.
*** 2637,2649 ****
* to use Mincho instead of Gothic for dialoginput in JA locales
* on windows. Not needed on other platforms.
*/
public synchronized void useAlternateFontforJALocales() {
if (FontUtilities.isLogging()) {
! FontUtilities.getLogger()
! .info("Entered useAlternateFontforJALocales().");
}
if (!FontUtilities.isWindows) {
return;
}
gAltJAFont = true;
}
--- 2611,2623 ----
* to use Mincho instead of Gothic for dialoginput in JA locales
* on windows. Not needed on other platforms.
*/
public synchronized void useAlternateFontforJALocales() {
if (FontUtilities.isLogging()) {
! FontUtilities.logInfo("Entered useAlternateFontforJALocales().");
}
+
if (!FontUtilities.isWindows) {
return;
}
gAltJAFont = true;
}
*** 2652,2663 ****
return gAltJAFont;
}
public synchronized void preferLocaleFonts() {
if (FontUtilities.isLogging()) {
! FontUtilities.getLogger().info("Entered preferLocaleFonts().");
}
/* Test if re-ordering will have any effect */
if (!FontConfiguration.willReorderForStartupLocale()) {
return;
}
if (gLocalePref == true) {
--- 2626,2638 ----
return gAltJAFont;
}
public synchronized void preferLocaleFonts() {
if (FontUtilities.isLogging()) {
! FontUtilities.logInfo("Entered preferLocaleFonts().");
}
+
/* Test if re-ordering will have any effect */
if (!FontConfiguration.willReorderForStartupLocale()) {
return;
}
if (gLocalePref == true) {
*** 2668,2680 ****
_usingAlternateComposites = true;
}
public synchronized void preferProportionalFonts() {
if (FontUtilities.isLogging()) {
! FontUtilities.getLogger()
! .info("Entered preferProportionalFonts().");
}
/* If no proportional fonts are configured, there's no need
* to take any action.
*/
if (!FontConfiguration.hasMonoToPropMap()) {
return;
--- 2643,2655 ----
_usingAlternateComposites = true;
}
public synchronized void preferProportionalFonts() {
if (FontUtilities.isLogging()) {
! FontUtilities.logInfo("Entered preferProportionalFonts().");
}
+
/* If no proportional fonts are configured, there's no need
* to take any action.
*/
if (!FontConfiguration.hasMonoToPropMap()) {
return;
*** 2910,2921 ****
continue;
}
if (badFonts != null && badFonts.contains(fullName)) {
if (FontUtilities.debugFonts()) {
! FontUtilities.getLogger()
! .warning("skip bad font " + fullName);
}
continue; // skip this font file.
}
registeredFontFiles.add(fullName);
--- 2885,2895 ----
continue;
}
if (badFonts != null && badFonts.contains(fullName)) {
if (FontUtilities.debugFonts()) {
! FontUtilities.logWarning("skip bad font " + fullName);
}
continue; // skip this font file.
}
registeredFontFiles.add(fullName);
*** 2930,2940 ****
message += " with native name(s) " + natNames[0];
for (int nn = 1; nn < natNames.length; nn++) {
message += ", " + natNames[nn];
}
}
! FontUtilities.getLogger().info(message);
}
fontNames[fontCount] = fullName;
nativeNames[fontCount++] = getNativeNames(fullName, null);
}
registerFonts(fontNames, nativeNames, fontCount, fontFormat,
--- 2904,2914 ----
message += " with native name(s) " + natNames[0];
for (int nn = 1; nn < natNames.length; nn++) {
message += ", " + natNames[nn];
}
}
! FontUtilities.logInfo(message);
}
fontNames[fontCount] = fullName;
nativeNames[fontCount++] = getNativeNames(fullName, null);
}
registerFonts(fontNames, nativeNames, fontCount, fontFormat,
*** 2980,2991 ****
}
/* Use lock specific to the font system */
synchronized (this) {
if (FontUtilities.debugFonts()) {
Thread.dumpStack();
! FontUtilities.getLogger()
! .info("SunGraphicsEnvironment.loadFonts() called");
}
initialiseDeferredFonts();
AccessController.doPrivileged(new PrivilegedAction<Void>() {
public Void run() {
--- 2954,2964 ----
}
/* Use lock specific to the font system */
synchronized (this) {
if (FontUtilities.debugFonts()) {
Thread.dumpStack();
! FontUtilities.logInfo("SunGraphicsEnvironment.loadFonts() called");
}
initialiseDeferredFonts();
AccessController.doPrivileged(new PrivilegedAction<Void>() {
public Void run() {
*** 3099,3109 ****
}
/* Use lock specific to the font system */
synchronized (this) {
if (FontUtilities.debugFonts()) {
Thread.dumpStack();
! FontUtilities.getLogger().info("loadAllFontFiles() called");
}
AccessController.doPrivileged(new PrivilegedAction<Void>() {
public Void run() {
if (fontPath == null) {
fontPath = getPlatformFontPath(noType1Font);
--- 3072,3082 ----
}
/* Use lock specific to the font system */
synchronized (this) {
if (FontUtilities.debugFonts()) {
Thread.dumpStack();
! FontUtilities.logInfo("loadAllFontFiles() called");
}
AccessController.doPrivileged(new PrivilegedAction<Void>() {
public Void run() {
if (fontPath == null) {
fontPath = getPlatformFontPath(noType1Font);
*** 3131,3144 ****
* The composites themselves are then registered.
*/
private void
initCompositeFonts(FontConfiguration fontConfig,
ConcurrentHashMap<String, Font2D> altNameCache) {
-
if (FontUtilities.isLogging()) {
! FontUtilities.getLogger()
! .info("Initialising composite fonts");
}
int numCoreFonts = fontConfig.getNumberCoreFonts();
String[] fcFonts = fontConfig.getPlatformFontNames();
for (int f=0; f<fcFonts.length; f++) {
--- 3104,3115 ----
* The composites themselves are then registered.
*/
private void
initCompositeFonts(FontConfiguration fontConfig,
ConcurrentHashMap<String, Font2D> altNameCache) {
if (FontUtilities.isLogging()) {
! FontUtilities.logInfo("Initialising composite fonts");
}
int numCoreFonts = fontConfig.getNumberCoreFonts();
String[] fcFonts = fontConfig.getPlatformFontNames();
for (int f=0; f<fcFonts.length; f++) {
*** 3234,3245 ****
descriptor.getExclusionRanges(),
descriptor.getExclusionRangeLimits(),
true);
}
if (FontUtilities.debugFonts()) {
! FontUtilities.getLogger()
! .info("registered " + descriptor.getFaceName());
}
}
}
/**
--- 3205,3215 ----
descriptor.getExclusionRanges(),
descriptor.getExclusionRangeLimits(),
true);
}
if (FontUtilities.debugFonts()) {
! FontUtilities.logInfo("registered " + descriptor.getFaceName());
}
}
}
/**
< prev index next >