< prev index next >
src/java.desktop/share/classes/sun/font/SunFontManager.java
Print this page
rev 60042 : 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,574 ****
}
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);
FontFamily family = FontFamily.getFamily(f.familyName);
--- 559,570 ----
}
altNameCache.put(compositeName.toLowerCase(Locale.ENGLISH), cf);
}
private void addCompositeToFontList(CompositeFont f, int rank) {
! 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);
FontFamily family = FontFamily.getFamily(f.familyName);
*** 622,635 ****
/* Don't register any font that has the same name as a composite */
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);
family.setFont(f, f.style);
--- 618,629 ----
/* Don't register any font that has the same name as a composite */
return null;
}
f.setRank(rank);
if (!physicalFonts.containsKey(fontName)) {
! 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);
family.setFont(f, f.style);
*** 696,722 ****
* the host O/S version is for the use of AWT.
* 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);
physicalFonts.put(fontName, newFont);
fullNameToFont.put(fontName.toLowerCase(Locale.ENGLISH),
newFont);
--- 690,709 ----
* the host O/S version is for the use of AWT.
* In other words if we reach here, there's a possible
* problem with our choice of font configuration fonts.
*/
if (oldFont.platName.startsWith(jreFontDirName)) {
! FontUtilities.logWarning("Unexpected attempt to replace a JRE " +
! " font " + fontName + " from " + oldFont.platName +
" with " + newFont.platName);
return oldFont;
}
! FontUtilities.logInfo("Replace in Family " + familyName +
",Font " + fontName + " new rank="+rank +
" from " + oldFont.platName +
" with " + newFont.platName);
replaceFont(oldFont, newFont);
physicalFonts.put(fontName, newFont);
fullNameToFont.put(fontName.toLowerCase(Locale.ENGLISH),
newFont);
*** 900,913 ****
PhysicalFont initialiseDeferredFont(String fileNameKey) {
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) {
deferredFontFiles.remove(fileNameKey);
--- 887,897 ----
PhysicalFont initialiseDeferredFont(String fileNameKey) {
if (fileNameKey == null) {
return null;
}
! FontUtilities.logInfo("Opening deferred font file " + fileNameKey);
PhysicalFont physicalFont = null;
FontRegistrationInfo regInfo = deferredFontFiles.get(fileNameKey);
if (regInfo != null) {
deferredFontFiles.remove(fileNameKey);
*** 988,1007 ****
physicalFont = addToFontList(nf, fontRank);
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);
}
--- 972,985 ----
physicalFont = addToFontList(nf, fontRank);
break;
default:
}
! FontUtilities.logInfo("Registered file " + fileName + " as font " +
physicalFont + " rank=" + fontRank);
} catch (FontFormatException ffe) {
! FontUtilities.logInfo("Unusable font: " + fileName + " " + ffe.toString());
}
if (physicalFont != null &&
fontFormat != FONTFORMAT_NATIVE) {
registeredFonts.put(fileName, physicalFont);
}
*** 1039,1055 ****
Font2D font2d = findFont2D(defaultFontName, Font.PLAIN, NO_FALLBACK);
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) {
/* Because of the findFont2D call above, if we reach here, we
* know all fonts have already been loaded, just accept any
* match at this point. If this fails we are in real trouble
* and I don't know how to recover from there being absolutely
--- 1017,1030 ----
Font2D font2d = findFont2D(defaultFontName, Font.PLAIN, NO_FALLBACK);
if (font2d != null) {
if (font2d instanceof PhysicalFont) {
defaultPhysicalFont = (PhysicalFont)font2d;
} else {
! FontUtilities.logWarning("Font returned by findFont2D for default font name " +
defaultFontName + " is not a physical font: " + font2d.getFontName(null));
}
}
if (defaultPhysicalFont == null) {
/* Because of the findFont2D call above, if we reach here, we
* know all fonts have already been loaded, just accept any
* match at this point. If this fails we are in real trouble
* and I don't know how to recover from there being absolutely
*** 1301,1314 ****
familyToFontListMap.remove(familyName);
}
}
}
fontToFamilyNameMap.remove(name);
! if (FontUtilities.isLogging()) {
! FontUtilities.getLogger()
! .info("No file for font:" + name);
! }
}
}
}
}
--- 1276,1286 ----
familyToFontListMap.remove(familyName);
}
}
}
fontToFamilyNameMap.remove(name);
! FontUtilities.logInfo("No file for font:" + name);
}
}
}
}
*** 1352,1365 ****
HashMap<String,String> fontToFamilyNameMap2 = null;
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;
}
if (fontToFileMap2 == null) {
--- 1324,1334 ----
HashMap<String,String> fontToFamilyNameMap2 = null;
HashMap<String,ArrayList<String>> familyToFontListMap2 = null;;
for (String pathFile : getFontFilesFromPath(false)) {
if (!registryFiles.contains(pathFile)) {
! FontUtilities.logInfo("Found non-registry file : " + pathFile);
PhysicalFont f = registerFontFile(getPathName(pathFile));
if (f == null) {
continue;
}
if (fontToFileMap2 == null) {
*** 1397,1424 ****
for (String file : unmappedFiles) {
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());
} catch (Exception e) {
}
}
}
--- 1366,1387 ----
for (String file : unmappedFiles) {
try {
int fn = 0;
TrueTypeFont ttf;
String fullPath = getPathName(file);
! 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);
! FontUtilities.logInfo("Resolved absent registry entry for " +
fontName + " located in " + fullPath);
}
}
while (fn < ttf.getFontCount());
} catch (Exception e) {
}
}
}
*** 1535,1548 ****
failure = true;
}
}
if (failure) {
! if (FontUtilities.isLogging()) {
! FontUtilities.getLogger().
! info("Hardcoded file missing looking for " + lcName);
! }
platformFontMap.remove(firstWord);
return null;
}
/* Some of these may be null,as not all styles have to exist */
--- 1498,1508 ----
failure = true;
}
}
if (failure) {
! FontUtilities.logInfo("Hardcoded file missing looking for " + lcName);
platformFontMap.remove(firstWord);
return null;
}
/* Some of these may be null,as not all styles have to exist */
*** 1563,1576 ****
return Boolean.FALSE;
}
});
if (failure) {
! if (FontUtilities.isLogging()) {
! FontUtilities.getLogger().
! info("Hardcoded file missing looking for " + lcName);
! }
platformFontMap.remove(firstWord);
return null;
}
/* If we reach here we know that we have all the files we
--- 1523,1533 ----
return Boolean.FALSE;
}
});
if (failure) {
! FontUtilities.logInfo("Hardcoded file missing looking for " + lcName);
platformFontMap.remove(firstWord);
return null;
}
/* If we reach here we know that we have all the files we
*** 1831,1845 ****
*/
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;
}
}
/* Currently this code only looks for TrueType fonts, so format
--- 1788,1799 ----
*/
for (int f=0;f<fontList.length;f++) {
String fontNameLC = fontList[f].toLowerCase(Locale.ENGLISH);
String fileName = fontToFileMap.get(fontNameLC);
if (fileName == null) {
! FontUtilities.logInfo("Platform lookup : No file for font " +
fontList[f] + " in family " +familyName);
return null;
}
}
/* Currently this code only looks for TrueType fonts, so format
*** 1904,1916 ****
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
// appropriate equivalents for serif and sansserif.
--- 1858,1868 ----
Font2D font = fontNameCache.get(mapName);
if (font != null) {
return font;
}
! 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
// appropriate equivalents for serif and sansserif.
*** 2018,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
--- 1970,1981 ----
}
if (FontUtilities.isWindows) {
font = findFontFromPlatformMap(lowerCaseName, style);
! 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
*** 2039,2054 ****
return font;
}
}
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;
}
}
--- 1989,2001 ----
return font;
}
}
font = findFontFromPlatform(lowerCaseName, style);
if (font != null) {
! FontUtilities.logInfo("Found font via platform API for request:\"" +
name + "\":, style="+style+
" found font: " + font);
fontNameCache.put(mapName, font);
return font;
}
}
*** 2113,2136 ****
/* 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);
}
--- 2060,2077 ----
/* If reach here and no match has been located, then if all fonts
* are not yet loaded, do so, and then recurse.
*/
if (!loadedAllFonts) {
! FontUtilities.logInfo("Load fonts looking for:" + name);
loadFonts();
loadedAllFonts = true;
return findFont2D(name, style, fallback);
}
if (!loadedAllFontFiles) {
! FontUtilities.logInfo("Load font files looking for:" + name);
loadFontFiles();
loadedAllFontFiles = true;
return findFont2D(name, style, fallback);
}
*** 2184,2196 ****
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);
default: return null;
--- 2125,2135 ----
font = findFont2D("monospaced", style, fallback);
fontNameCache.put(mapName, font);
return font;
}
! FontUtilities.logInfo("No font found for:" + name);
switch (fallback) {
case PHYSICAL_FALLBACK: return getDefaultPhysicalFont();
case LOGICAL_FALLBACK: return getDefaultLogicalFont(style);
default: return null;
*** 2359,2372 ****
public synchronized void deRegisterBadFont(Font2D font2D) {
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());
}
}
/*
--- 2298,2308 ----
public synchronized void deRegisterBadFont(Font2D font2D) {
if (!(font2D instanceof PhysicalFont)) {
/* We should never reach here, but just in case */
return;
} else {
! FontUtilities.logSevere("Deregister bad font: " + font2D);
replaceFont((PhysicalFont)font2D, getDefaultPhysicalFont());
}
}
/*
*** 2383,2408 ****
/* 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;
}
}
/* eliminate references to this font, so it won't be located
--- 2319,2338 ----
/* If we try to replace the font with itself, that won't work,
* so pick any alternative physical font
*/
if (oldFont == newFont) {
! 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) {
! FontUtilities.logSevere("This is bad. No good physicalFonts found.");
return;
}
}
/* eliminate references to this font, so it won't be located
*** 2498,2512 ****
* 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.
*/
--- 2428,2438 ----
* 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) {
! 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.
*/
*** 2636,2649 ****
/* Modifies the behaviour of a subsequent call to preferLocaleFonts()
* 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;
}
--- 2562,2573 ----
/* Modifies the behaviour of a subsequent call to preferLocaleFonts()
* to use Mincho instead of Gothic for dialoginput in JA locales
* on windows. Not needed on other platforms.
*/
public synchronized void useAlternateFontforJALocales() {
! FontUtilities.logInfo("Entered useAlternateFontforJALocales().");
!
if (!FontUtilities.isWindows) {
return;
}
gAltJAFont = true;
}
*** 2651,2663 ****
public boolean usingAlternateFontforJALocales() {
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) {
--- 2575,2586 ----
public boolean usingAlternateFontforJALocales() {
return gAltJAFont;
}
public synchronized void preferLocaleFonts() {
! FontUtilities.logInfo("Entered preferLocaleFonts().");
!
/* Test if re-ordering will have any effect */
if (!FontConfiguration.willReorderForStartupLocale()) {
return;
}
if (gLocalePref == true) {
*** 2667,2680 ****
createCompositeFonts(fontNameCache, gLocalePref, gPropPref);
_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;
--- 2590,2601 ----
createCompositeFonts(fontNameCache, gLocalePref, gPropPref);
_usingAlternateComposites = true;
}
public synchronized void preferProportionalFonts() {
! 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);
--- 2831,2841 ----
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,
--- 2850,2860 ----
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() {
--- 2900,2910 ----
}
/* 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);
--- 3018,3028 ----
}
/* 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,3145 ****
* 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++) {
String platformFontName = fcFonts[f];
--- 3050,3060 ----
* The composites themselves are then registered.
*/
private void
initCompositeFonts(FontConfiguration fontConfig,
ConcurrentHashMap<String, Font2D> altNameCache) {
! FontUtilities.logInfo("Initialising composite fonts");
int numCoreFonts = fontConfig.getNumberCoreFonts();
String[] fcFonts = fontConfig.getPlatformFontNames();
for (int f=0; f<fcFonts.length; f++) {
String platformFontName = fcFonts[f];
*** 3234,3245 ****
descriptor.getExclusionRanges(),
descriptor.getExclusionRangeLimits(),
true);
}
if (FontUtilities.debugFonts()) {
! FontUtilities.getLogger()
! .info("registered " + descriptor.getFaceName());
}
}
}
/**
--- 3149,3159 ----
descriptor.getExclusionRanges(),
descriptor.getExclusionRangeLimits(),
true);
}
if (FontUtilities.debugFonts()) {
! FontUtilities.logInfo("registered " + descriptor.getFaceName());
}
}
}
/**
< prev index next >