8248802: Add log helper methods to FontUtilities.java

Reviewed-by: clanger, jdv
This commit is contained in:
Matthias Baesken 2020-07-14 17:02:48 +02:00
parent 13bcda40dc
commit 7a0914c44c
14 changed files with 139 additions and 198 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -96,8 +96,8 @@ public final class CFontManager extends SunFontManager {
// already existing fonts in this list // already existing fonts in this list
if (logicalFont || !genericFonts.containsKey(fontName)) { if (logicalFont || !genericFonts.containsKey(fontName)) {
if (FontUtilities.debugFonts()) { if (FontUtilities.debugFonts()) {
FontUtilities.getLogger().info("Add to Family "+familyName + FontUtilities.logInfo("Add to Family " + familyName +
", Font " + fontName + " rank="+rank); ", Font " + fontName + " rank=" + rank);
} }
FontFamily family = FontFamily.getFamily(familyName); FontFamily family = FontFamily.getFamily(familyName);
if (family == null) { if (family == null) {

View File

@ -83,8 +83,7 @@ public abstract class FontConfiguration {
*/ */
public FontConfiguration(SunFontManager fm) { public FontConfiguration(SunFontManager fm) {
if (FontUtilities.debugFonts()) { if (FontUtilities.debugFonts()) {
FontUtilities.getLogger() FontUtilities.logInfo("Creating standard Font Configuration");
.info("Creating standard Font Configuration");
} }
if (FontUtilities.debugFonts() && logger == null) { if (FontUtilities.debugFonts() && logger == null) {
logger = PlatformLogger.getLogger("sun.awt.FontConfiguration"); logger = PlatformLogger.getLogger("sun.awt.FontConfiguration");
@ -116,8 +115,7 @@ public abstract class FontConfiguration {
boolean preferPropFonts) { boolean preferPropFonts) {
fontManager = fm; fontManager = fm;
if (FontUtilities.debugFonts()) { if (FontUtilities.debugFonts()) {
FontUtilities.getLogger() FontUtilities.logInfo("Creating alternate Font Configuration");
.info("Creating alternate Font Configuration");
} }
this.preferLocaleFonts = preferLocaleFonts; this.preferLocaleFonts = preferLocaleFonts;
this.preferPropFonts = preferPropFonts; this.preferPropFonts = preferPropFonts;

View File

@ -400,10 +400,8 @@ abstract class CMap {
} else { } else {
subtableLength = buffer.getInt(offset+4) & INTMASK; subtableLength = buffer.getInt(offset+4) & INTMASK;
} }
if (offset+subtableLength > buffer.capacity()) { if (FontUtilities.isLogging() && offset + subtableLength > buffer.capacity()) {
if (FontUtilities.isLogging()) { FontUtilities.logWarning("Cmap subtable overflows buffer.");
FontUtilities.getLogger().warning("Cmap subtable overflows buffer.");
}
} }
switch (subtableFormat) { switch (subtableFormat) {
case 0: return new CMapFormat0(buffer, offset); case 0: return new CMapFormat0(buffer, offset);
@ -422,11 +420,8 @@ abstract class CMap {
int subtableFormat = buffer.getChar(offset); int subtableFormat = buffer.getChar(offset);
if (subtableFormat == 14) { if (subtableFormat == 14) {
long subtableLength = buffer.getInt(offset + 2) & INTMASK; long subtableLength = buffer.getInt(offset + 2) & INTMASK;
if (offset + subtableLength > buffer.capacity()) { if (FontUtilities.isLogging() && offset + subtableLength > buffer.capacity()) {
if (FontUtilities.isLogging()) { FontUtilities.logWarning("Cmap UVS subtable overflows buffer.");
FontUtilities.getLogger()
.warning("Cmap UVS subtable overflows buffer.");
}
} }
try { try {
this.uvs = new UVS(buffer, offset); this.uvs = new UVS(buffer, offset);

View File

@ -223,8 +223,7 @@ public class FileFontStrike extends PhysicalStrike {
useNatives = true; useNatives = true;
} }
if (FontUtilities.isLogging() && FontUtilities.isWindows) { if (FontUtilities.isLogging() && FontUtilities.isWindows) {
FontUtilities.getLogger().info FontUtilities.logInfo("Strike for " + fileFont + " at size = " + intPtSize +
("Strike for " + fileFont + " at size = " + intPtSize +
" use natives = " + useNatives + " use natives = " + useNatives +
" useJavaRasteriser = " + fileFont.useJavaRasterizer + " useJavaRasteriser = " + fileFont.useJavaRasterizer +
" AAHint = " + desc.aaHint + " AAHint = " + desc.aaHint +
@ -319,10 +318,9 @@ public class FileFontStrike extends PhysicalStrike {
return ptr; return ptr;
} else { } else {
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger().warning( FontUtilities.logWarning("Failed to render glyph using GDI: code=" + glyphCode
"Failed to render glyph using GDI: code=" + glyphCode + ", fontFamily=" + family + ", style=" + style
+ ", fontFamily=" + family + ", style=" + style + ", size=" + size);
+ ", size=" + size);
} }
return fileFont.getGlyphImage(pScalerContext, glyphCode); return fileFont.getGlyphImage(pScalerContext, glyphCode);
} }
@ -356,14 +354,13 @@ public class FileFontStrike extends PhysicalStrike {
if (useNatives) { if (useNatives) {
glyphPtr = getGlyphImageFromNative(glyphCode); glyphPtr = getGlyphImageFromNative(glyphCode);
if (glyphPtr == 0L && FontUtilities.isLogging()) { if (glyphPtr == 0L && FontUtilities.isLogging()) {
FontUtilities.getLogger().info FontUtilities.logInfo("Strike for " + fileFont +
("Strike for " + fileFont +
" at size = " + intPtSize + " at size = " + intPtSize +
" couldn't get native glyph for code = " + glyphCode); " couldn't get native glyph for code = " + glyphCode);
} }
} if (glyphPtr == 0L) { }
glyphPtr = fileFont.getGlyphImage(pScalerContext, if (glyphPtr == 0L) {
glyphCode); glyphPtr = fileFont.getGlyphImage(pScalerContext, glyphCode);
} }
return setCachedGlyphPtr(glyphCode, glyphPtr); return setCachedGlyphPtr(glyphCode, glyphPtr);
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -181,7 +181,7 @@ public class FontFamily {
Math.abs(Font2D.FWIDTH_NORMAL - familyWidth)) Math.abs(Font2D.FWIDTH_NORMAL - familyWidth))
{ {
if (FontUtilities.debugFonts()) { if (FontUtilities.debugFonts()) {
FontUtilities.getLogger().info( FontUtilities.logInfo(
"Found more preferred width. New width = " + newWidth + "Found more preferred width. New width = " + newWidth +
" Old width = " + familyWidth + " in font " + font + " Old width = " + familyWidth + " in font " + font +
" nulling out fonts plain: " + plain + " bold: " + bold + " nulling out fonts plain: " + plain + " bold: " + bold +
@ -191,7 +191,7 @@ public class FontFamily {
plain = bold = italic = bolditalic = null; plain = bold = italic = bolditalic = null;
return true; return true;
} else if (FontUtilities.debugFonts()) { } else if (FontUtilities.debugFonts()) {
FontUtilities.getLogger().info( FontUtilities.logInfo(
"Family rejecting font " + font + "Family rejecting font " + font +
" of less preferred width " + newWidth); " of less preferred width " + newWidth);
} }
@ -208,7 +208,7 @@ public class FontFamily {
} }
if (FontUtilities.debugFonts()) { if (FontUtilities.debugFonts()) {
FontUtilities.getLogger().info( FontUtilities.logInfo(
"New weight for style " + style + ". Curr.font=" + currFont + "New weight for style " + style + ". Curr.font=" + currFont +
" New font="+font+" Curr.weight="+ + currFont.getWeight()+ " New font="+font+" Curr.weight="+ + currFont.getWeight()+
" New weight="+font.getWeight()); " New weight="+font.getWeight());
@ -242,18 +242,17 @@ public class FontFamily {
msg = "Request to add " + font + msg = "Request to add " + font +
" with style " + style + " to family " + this; " with style " + style + " to family " + this;
} }
FontUtilities.getLogger().info(msg); FontUtilities.logInfo(msg);
} }
/* Allow a lower-rank font only if its a file font /* Allow a lower-rank font only if its a file font
* from the exact same source as any previous font. * from the exact same source as any previous font.
*/ */
if ((font.getRank() > familyRank) && !isFromSameSource(font)) { if ((font.getRank() > familyRank) && !isFromSameSource(font)) {
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger() FontUtilities.logWarning("Rejecting adding " + font +
.warning("Rejecting adding " + font + " of lower rank " + font.getRank() +
" of lower rank " + font.getRank() + " to family " + this +
" to family " + this + " of rank " + familyRank);
" of rank " + familyRank);
} }
return; return;
} }

View File

@ -26,10 +26,6 @@
package sun.font; package sun.font;
import java.awt.Font; import java.awt.Font;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.lang.ref.SoftReference; import java.lang.ref.SoftReference;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import java.security.AccessController; import java.security.AccessController;
@ -112,10 +108,6 @@ public final class FontUtilities {
} else if (debugLevel.equals("severe")) { } else if (debugLevel.equals("severe")) {
logger.setLevel(PlatformLogger.Level.SEVERE); logger.setLevel(PlatformLogger.Level.SEVERE);
} }
}
if (debugFonts) {
logger = PlatformLogger.getLogger("sun.java2d");
logging = logger.isEnabled(); logging = logger.isEnabled();
} }
@ -324,6 +316,17 @@ public final class FontUtilities {
return debugFonts; return debugFonts;
} }
public static void logWarning(String s) {
getLogger().warning(s);
}
public static void logInfo(String s) {
getLogger().info(s);
}
public static void logSevere(String s) {
getLogger().severe(s);
}
// The following methods are used by Swing. // The following methods are used by Swing.

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -478,8 +478,7 @@ public final class GlyphLayout {
if (_gvdata._count < 0) { if (_gvdata._count < 0) {
gv = new StandardGlyphVector(font, text, offset, count, frc); gv = new StandardGlyphVector(font, text, offset, count, frc);
if (FontUtilities.debugFonts()) { if (FontUtilities.debugFonts()) {
FontUtilities.getLogger().warning("OpenType layout failed on font: " + FontUtilities.logWarning("OpenType layout failed on font: " + font);
font);
} }
} else { } else {
gv = _gvdata.createGlyphVector(font, frc, result); gv = _gvdata.createGlyphVector(font, frc, result);

View File

@ -320,7 +320,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
break; break;
} else { } else {
if (FontUtilities.debugFonts()) { if (FontUtilities.debugFonts()) {
FontUtilities.getLogger().warning("read bad font: " + name); FontUtilities.logWarning("read bad font: " + name);
} }
badFonts.add(name); badFonts.add(name);
} }
@ -354,7 +354,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
String[] fontInfo = getDefaultPlatformFont(); String[] fontInfo = getDefaultPlatformFont();
defaultFontName = fontInfo[0]; defaultFontName = fontInfo[0];
if (defaultFontName == null && FontUtilities.debugFonts()) { if (defaultFontName == null && FontUtilities.debugFonts()) {
FontUtilities.getLogger().warning("defaultFontName is null"); FontUtilities.logWarning("defaultFontName is null");
} }
defaultFontFileName = fontInfo[1]; defaultFontFileName = fontInfo[1];
@ -403,10 +403,9 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
} }
if (FontUtilities.debugFonts()) { if (FontUtilities.debugFonts()) {
PlatformLogger logger = FontUtilities.getLogger(); FontUtilities.logInfo("JRE font directory: " + jreFontDirName);
logger.info("JRE font directory: " + jreFontDirName); FontUtilities.logInfo("Extra font path: " + extraFontPath);
logger.info("Extra font path: " + extraFontPath); FontUtilities.logInfo("Debug font path: " + dbgFontPath);
logger.info("Debug font path: " + dbgFontPath);
} }
if (dbgFontPath != null) { if (dbgFontPath != null) {
@ -562,10 +561,9 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
} }
private void addCompositeToFontList(CompositeFont f, int rank) { private void addCompositeToFontList(CompositeFont f, int rank) {
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger().info("Add to Family "+ f.familyName + FontUtilities.logInfo("Add to Family " + f.familyName +
", Font " + f.fullName + " rank="+rank); ", Font " + f.fullName + " rank=" + rank);
} }
f.setRank(rank); f.setRank(rank);
compositeFonts.put(f.fullName, f); compositeFonts.put(f.fullName, f);
@ -625,8 +623,8 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
f.setRank(rank); f.setRank(rank);
if (!physicalFonts.containsKey(fontName)) { if (!physicalFonts.containsKey(fontName)) {
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger().info("Add to Family "+familyName + FontUtilities.logInfo("Add to Family " + familyName +
", Font " + fontName + " rank="+rank); ", Font " + fontName + " rank=" + rank);
} }
physicalFonts.put(fontName, f); physicalFonts.put(fontName, f);
FontFamily family = FontFamily.getFamily(familyName); FontFamily family = FontFamily.getFamily(familyName);
@ -699,21 +697,18 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
*/ */
if (oldFont.platName.startsWith(jreFontDirName)) { if (oldFont.platName.startsWith(jreFontDirName)) {
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger() FontUtilities.logWarning("Unexpected attempt to replace a JRE " +
.warning("Unexpected attempt to replace a JRE " + " font " + fontName + " from " + oldFont.platName +
" font " + fontName + " from " +
oldFont.platName +
" with " + newFont.platName); " with " + newFont.platName);
} }
return oldFont; return oldFont;
} }
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger() FontUtilities.logInfo("Replace in Family " + familyName +
.info("Replace in Family " + familyName + ",Font " + fontName + " new rank="+rank +
",Font " + fontName + " new rank="+rank + " from " + oldFont.platName +
" from " + oldFont.platName + " with " + newFont.platName);
" with " + newFont.platName);
} }
replaceFont(oldFont, newFont); replaceFont(oldFont, newFont);
physicalFonts.put(fontName, newFont); physicalFonts.put(fontName, newFont);
@ -903,8 +898,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
return null; return null;
} }
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger() FontUtilities.logInfo("Opening deferred font file " + fileNameKey);
.info("Opening deferred font file " + fileNameKey);
} }
PhysicalFont physicalFont = null; PhysicalFont physicalFont = null;
@ -991,14 +985,12 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
} }
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger() FontUtilities.logInfo("Registered file " + fileName + " as font " +
.info("Registered file " + fileName + " as font " + physicalFont + " rank=" + fontRank);
physicalFont + " rank=" + fontRank);
} }
} catch (FontFormatException ffe) { } catch (FontFormatException ffe) {
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger().warning("Unusable font: " + FontUtilities.logInfo("Unusable font: " + fileName + " " + ffe.toString());
fileName + " " + ffe.toString());
} }
} }
if (physicalFont != null && if (physicalFont != null &&
@ -1042,8 +1034,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
defaultPhysicalFont = (PhysicalFont)font2d; defaultPhysicalFont = (PhysicalFont)font2d;
} else { } else {
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger() FontUtilities.logWarning("Font returned by findFont2D for default font name " +
.warning("Font returned by findFont2D for default font name " +
defaultFontName + " is not a physical font: " + font2d.getFontName(null)); defaultFontName + " is not a physical font: " + font2d.getFontName(null));
} }
} }
@ -1304,8 +1295,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
} }
fontToFamilyNameMap.remove(name); fontToFamilyNameMap.remove(name);
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger() FontUtilities.logInfo("No file for font:" + name);
.info("No file for font:" + name);
} }
} }
} }
@ -1355,8 +1345,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
for (String pathFile : getFontFilesFromPath(false)) { for (String pathFile : getFontFilesFromPath(false)) {
if (!registryFiles.contains(pathFile)) { if (!registryFiles.contains(pathFile)) {
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger() FontUtilities.logInfo("Found non-registry file : " + pathFile);
.info("Found non-registry file : " + pathFile);
} }
PhysicalFont f = registerFontFile(getPathName(pathFile)); PhysicalFont f = registerFontFile(getPathName(pathFile));
if (f == null) { if (f == null) {
@ -1400,8 +1389,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
TrueTypeFont ttf; TrueTypeFont ttf;
String fullPath = getPathName(file); String fullPath = getPathName(file);
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger() FontUtilities.logInfo("Trying to resolve file " + fullPath);
.info("Trying to resolve file " + fullPath);
} }
do { do {
ttf = new TrueTypeFont(fullPath, null, fn++, false); ttf = new TrueTypeFont(fullPath, null, fn++, false);
@ -1411,9 +1399,8 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
fontToFileMap.put(fontName, file); fontToFileMap.put(fontName, file);
unmappedFonts.remove(fontName); unmappedFonts.remove(fontName);
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger() FontUtilities.logInfo("Resolved absent registry entry for " +
.info("Resolved absent registry entry for " + fontName + " located in " + fullPath);
fontName + " located in " + fullPath);
} }
} }
} }
@ -1538,8 +1525,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
if (failure) { if (failure) {
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger(). FontUtilities.logInfo("Hardcoded file missing looking for " + lcName);
info("Hardcoded file missing looking for " + lcName);
} }
platformFontMap.remove(firstWord); platformFontMap.remove(firstWord);
return null; return null;
@ -1566,8 +1552,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
if (failure) { if (failure) {
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger(). FontUtilities.logInfo("Hardcoded file missing looking for " + lcName);
info("Hardcoded file missing looking for " + lcName);
} }
platformFontMap.remove(firstWord); platformFontMap.remove(firstWord);
return null; return null;
@ -1834,9 +1819,8 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
String fileName = fontToFileMap.get(fontNameLC); String fileName = fontToFileMap.get(fontNameLC);
if (fileName == null) { if (fileName == null) {
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger() FontUtilities.logInfo("Platform lookup : No file for font " +
.info("Platform lookup : No file for font " + fontList[f] + " in family " +familyName);
fontList[f] + " in family " +familyName);
} }
return null; return null;
} }
@ -1905,9 +1889,8 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
if (font != null) { if (font != null) {
return font; return font;
} }
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger().info("Search for font: " + name); FontUtilities.logInfo("Search for font: " + name);
} }
// The check below is just so that the bitmap fonts being set by // The check below is just so that the bitmap fonts being set by
@ -2021,9 +2004,9 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
font = findFontFromPlatformMap(lowerCaseName, style); font = findFontFromPlatformMap(lowerCaseName, style);
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger() FontUtilities.logInfo("findFontFromPlatformMap returned " + font);
.info("findFontFromPlatformMap returned " + font);
} }
if (font != null) { if (font != null) {
fontNameCache.put(mapName, font); fontNameCache.put(mapName, font);
return font; return font;
@ -2042,10 +2025,9 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
font = findFontFromPlatform(lowerCaseName, style); font = findFontFromPlatform(lowerCaseName, style);
if (font != null) { if (font != null) {
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger() FontUtilities.logInfo("Found font via platform API for request:\"" +
.info("Found font via platform API for request:\"" + name + "\":, style="+style+
name + "\":, style="+style+ " found font: " + font);
" found font: " + font);
} }
fontNameCache.put(mapName, font); fontNameCache.put(mapName, font);
return font; return font;
@ -2116,8 +2098,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
*/ */
if (!loadedAllFonts) { if (!loadedAllFonts) {
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger() FontUtilities.logInfo("Load fonts looking for:" + name);
.info("Load fonts looking for:" + name);
} }
loadFonts(); loadFonts();
loadedAllFonts = true; loadedAllFonts = true;
@ -2126,8 +2107,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
if (!loadedAllFontFiles) { if (!loadedAllFontFiles) {
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger() FontUtilities.logInfo("Load font files looking for:" + name);
.info("Load font files looking for:" + name);
} }
loadFontFiles(); loadFontFiles();
loadedAllFontFiles = true; loadedAllFontFiles = true;
@ -2185,9 +2165,8 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
fontNameCache.put(mapName, font); fontNameCache.put(mapName, font);
return font; return font;
} }
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger().info("No font found for:" + name); FontUtilities.logInfo("No font found for:" + name);
} }
switch (fallback) { switch (fallback) {
@ -2362,8 +2341,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
return; return;
} else { } else {
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger() FontUtilities.logSevere("Deregister bad font: " + font2D);
.severe("Deregister bad font: " + font2D);
} }
replaceFont((PhysicalFont)font2D, getDefaultPhysicalFont()); replaceFont((PhysicalFont)font2D, getDefaultPhysicalFont());
} }
@ -2386,8 +2364,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
*/ */
if (oldFont == newFont) { if (oldFont == newFont) {
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger() FontUtilities.logSevere("Can't replace bad font with itself " + oldFont);
.severe("Can't replace bad font with itself " + oldFont);
} }
PhysicalFont[] physFonts = getPhysicalFonts(); PhysicalFont[] physFonts = getPhysicalFonts();
for (int i=0; i<physFonts.length;i++) { for (int i=0; i<physFonts.length;i++) {
@ -2398,8 +2375,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
} }
if (oldFont == newFont) { if (oldFont == newFont) {
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger() FontUtilities.logSevere("This is bad. No good physicalFonts found.");
.severe("This is bad. No good physicalFonts found.");
} }
return; return;
} }
@ -2500,10 +2476,8 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
* before returning the default case. * before returning the default case.
*/ */
private Font2D findFont2DAllLocales(String name, int style) { private Font2D findFont2DAllLocales(String name, int style) {
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger() FontUtilities.logInfo("Searching localised font names for:" + name);
.info("Searching localised font names for:" + name);
} }
/* If reach here and no match has been located, then if we have /* If reach here and no match has been located, then if we have
@ -2639,9 +2613,9 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
*/ */
public synchronized void useAlternateFontforJALocales() { public synchronized void useAlternateFontforJALocales() {
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger() FontUtilities.logInfo("Entered useAlternateFontforJALocales().");
.info("Entered useAlternateFontforJALocales().");
} }
if (!FontUtilities.isWindows) { if (!FontUtilities.isWindows) {
return; return;
} }
@ -2654,8 +2628,9 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
public synchronized void preferLocaleFonts() { public synchronized void preferLocaleFonts() {
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger().info("Entered preferLocaleFonts()."); FontUtilities.logInfo("Entered preferLocaleFonts().");
} }
/* Test if re-ordering will have any effect */ /* Test if re-ordering will have any effect */
if (!FontConfiguration.willReorderForStartupLocale()) { if (!FontConfiguration.willReorderForStartupLocale()) {
return; return;
@ -2670,9 +2645,9 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
public synchronized void preferProportionalFonts() { public synchronized void preferProportionalFonts() {
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger() FontUtilities.logInfo("Entered preferProportionalFonts().");
.info("Entered preferProportionalFonts().");
} }
/* If no proportional fonts are configured, there's no need /* If no proportional fonts are configured, there's no need
* to take any action. * to take any action.
*/ */
@ -2912,8 +2887,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
if (badFonts != null && badFonts.contains(fullName)) { if (badFonts != null && badFonts.contains(fullName)) {
if (FontUtilities.debugFonts()) { if (FontUtilities.debugFonts()) {
FontUtilities.getLogger() FontUtilities.logWarning("skip bad font " + fullName);
.warning("skip bad font " + fullName);
} }
continue; // skip this font file. continue; // skip this font file.
} }
@ -2932,7 +2906,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
message += ", " + natNames[nn]; message += ", " + natNames[nn];
} }
} }
FontUtilities.getLogger().info(message); FontUtilities.logInfo(message);
} }
fontNames[fontCount] = fullName; fontNames[fontCount] = fullName;
nativeNames[fontCount++] = getNativeNames(fullName, null); nativeNames[fontCount++] = getNativeNames(fullName, null);
@ -2982,8 +2956,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
synchronized (this) { synchronized (this) {
if (FontUtilities.debugFonts()) { if (FontUtilities.debugFonts()) {
Thread.dumpStack(); Thread.dumpStack();
FontUtilities.getLogger() FontUtilities.logInfo("SunGraphicsEnvironment.loadFonts() called");
.info("SunGraphicsEnvironment.loadFonts() called");
} }
initialiseDeferredFonts(); initialiseDeferredFonts();
@ -3101,7 +3074,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
synchronized (this) { synchronized (this) {
if (FontUtilities.debugFonts()) { if (FontUtilities.debugFonts()) {
Thread.dumpStack(); Thread.dumpStack();
FontUtilities.getLogger().info("loadAllFontFiles() called"); FontUtilities.logInfo("loadAllFontFiles() called");
} }
AccessController.doPrivileged(new PrivilegedAction<Void>() { AccessController.doPrivileged(new PrivilegedAction<Void>() {
public Void run() { public Void run() {
@ -3133,10 +3106,8 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
private void private void
initCompositeFonts(FontConfiguration fontConfig, initCompositeFonts(FontConfiguration fontConfig,
ConcurrentHashMap<String, Font2D> altNameCache) { ConcurrentHashMap<String, Font2D> altNameCache) {
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger() FontUtilities.logInfo("Initialising composite fonts");
.info("Initialising composite fonts");
} }
int numCoreFonts = fontConfig.getNumberCoreFonts(); int numCoreFonts = fontConfig.getNumberCoreFonts();
@ -3236,8 +3207,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
true); true);
} }
if (FontUtilities.debugFonts()) { if (FontUtilities.debugFonts()) {
FontUtilities.getLogger() FontUtilities.logInfo("registered " + descriptor.getFaceName());
.info("registered " + descriptor.getFaceName());
} }
} }
} }

View File

@ -244,7 +244,7 @@ public class TrueTypeFont extends FileFont {
throws FontFormatException { throws FontFormatException {
if (disposerRecord.channel == null) { if (disposerRecord.channel == null) {
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger().info("open TTF: " + platName); FontUtilities.logInfo("open TTF: " + platName);
} }
try { try {
RandomAccessFile raf = AccessController.doPrivileged( RandomAccessFile raf = AccessController.doPrivileged(
@ -310,9 +310,9 @@ public class TrueTypeFont extends FileFont {
*/ */
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
String msg = "Read offset is " + offset + String msg = "Read offset is " + offset +
" file size is " + fileSize+ " file size is " + fileSize+
" file is " + platName; " file is " + platName;
FontUtilities.getLogger().severe(msg); FontUtilities.logSevere(msg);
} }
return -1; return -1;
} else { } else {
@ -331,7 +331,7 @@ public class TrueTypeFont extends FileFont {
" and now is " + currSize; " and now is " + currSize;
} }
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger().severe(msg); FontUtilities.logSevere(msg);
} }
// We could still flip() the buffer here because // We could still flip() the buffer here because
// it's possible that we did read some data in // it's possible that we did read some data in
@ -346,9 +346,8 @@ public class TrueTypeFont extends FileFont {
if (bread > length/2 || bread > 16384) { if (bread > length/2 || bread > 16384) {
buffer.flip(); buffer.flip();
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
msg = "Returning " + bread + msg = "Returning " + bread + " bytes instead of " + length;
" bytes instead of " + length; FontUtilities.logSevere(msg);
FontUtilities.getLogger().severe(msg);
} }
} else { } else {
bread = -1; bread = -1;
@ -364,8 +363,7 @@ public class TrueTypeFont extends FileFont {
} }
} catch (FontFormatException e) { } catch (FontFormatException e) {
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger().severe( FontUtilities.getLogger().severe("While reading " + platName, e);
"While reading " + platName, e);
} }
bread = -1; // signal EOF bread = -1; // signal EOF
deregisterFontAndClearStrikeCache(); deregisterFontAndClearStrikeCache();
@ -385,8 +383,7 @@ public class TrueTypeFont extends FileFont {
* file are handled as a FontFormatException. * file are handled as a FontFormatException.
*/ */
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger().severe( FontUtilities.getLogger().severe("While reading " + platName, e);
"While reading " + platName, e);
} }
if (bread == 0) { if (bread == 0) {
bread = -1; // signal EOF bread = -1; // signal EOF
@ -523,7 +520,7 @@ public class TrueTypeFont extends FileFont {
initNames(); initNames();
} catch (Exception e) { } catch (Exception e) {
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger().severe(e.toString()); FontUtilities.logSevere(e.toString());
} }
if (e instanceof FontFormatException) { if (e instanceof FontFormatException) {
throw (FontFormatException)e; throw (FontFormatException)e;
@ -1073,7 +1070,7 @@ public class TrueTypeFont extends FileFont {
return new String(bytes, 0, len, charset); return new String(bytes, 0, len, charset);
} catch (UnsupportedEncodingException e) { } catch (UnsupportedEncodingException e) {
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger().warning(e + " EncodingID=" + encoding); FontUtilities.logWarning(e + " EncodingID=" + encoding);
} }
return new String(bytes, 0, len); return new String(bytes, 0, len);
} catch (Throwable t) { } catch (Throwable t) {

View File

@ -74,10 +74,9 @@ public class TrueTypeGlyphMapper extends CharToGlyphMapper {
return glyphCode; return glyphCode;
} else { } else {
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger().warning FontUtilities.logWarning(font + " out of range glyph id=" +
(font + " out of range glyph id=" + Integer.toHexString((int)glyphCode) +
Integer.toHexString((int)glyphCode) + " for char " + Integer.toHexString(charCode));
" for char " + Integer.toHexString(charCode));
} }
return (char)missingGlyph; return (char)missingGlyph;
} }
@ -99,8 +98,7 @@ public class TrueTypeGlyphMapper extends CharToGlyphMapper {
return glyphCode; return glyphCode;
} else { } else {
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger().warning FontUtilities.logWarning(font + " out of range glyph id=" +
(font + " out of range glyph id=" +
Integer.toHexString((int)glyphCode) + Integer.toHexString((int)glyphCode) +
" for char " + Integer.toHexString(charCode) + " for char " + Integer.toHexString(charCode) +
" for vs " + Integer.toHexString(variationSelector)); " for vs " + Integer.toHexString(variationSelector));
@ -115,9 +113,10 @@ public class TrueTypeGlyphMapper extends CharToGlyphMapper {
private void handleBadCMAP() { private void handleBadCMAP() {
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger().severe("Null Cmap for " + font + FontUtilities.logSevere("Null Cmap for " + font +
"substituting for this font"); "substituting for this font");
} }
SunFontManager.getInstance().deRegisterBadFont(font); SunFontManager.getInstance().deRegisterBadFont(font);
/* The next line is not really a solution, but might /* The next line is not really a solution, but might
* reduce the exceptions until references to this font2D * reduce the exceptions until references to this font2D

View File

@ -224,15 +224,13 @@ public final class X11FontManager extends FcFontManager {
if (fontPath == null && if (fontPath == null &&
(fileName == null || !fileName.startsWith("/"))) { (fileName == null || !fileName.startsWith("/"))) {
if (FontUtilities.debugFonts()) { if (FontUtilities.debugFonts()) {
FontUtilities.getLogger() FontUtilities.logWarning("** Registering all font paths because " +
.warning("** Registering all font paths because " + "can't find file for " + platName);
"can't find file for " + platName);
} }
fontPath = getPlatformFontPath(noType1Font); fontPath = getPlatformFontPath(noType1Font);
registerFontDirs(fontPath); registerFontDirs(fontPath);
if (FontUtilities.debugFonts()) { if (FontUtilities.debugFonts()) {
FontUtilities.getLogger() FontUtilities.logWarning("** Finished registering all font paths");
.warning("** Finished registering all font paths");
} }
fileName = fontNameMap.get(fontID); fileName = fontNameMap.get(fontID);
} }
@ -289,7 +287,7 @@ public final class X11FontManager extends FcFontManager {
* ... * ...
*/ */
if (FontUtilities.debugFonts()) { if (FontUtilities.debugFonts()) {
FontUtilities.getLogger().info("ParseFontDir " + path); FontUtilities.logInfo("ParseFontDir " + path);
} }
File fontsDotDir = new File(path + File.separator + "fonts.dir"); File fontsDotDir = new File(path + File.separator + "fonts.dir");
FileReader fr = null; FileReader fr = null;
@ -368,10 +366,9 @@ public final class X11FontManager extends FcFontManager {
String sVal = fontNameMap.get(fontID); String sVal = fontNameMap.get(fontID);
if (FontUtilities.debugFonts()) { if (FontUtilities.debugFonts()) {
PlatformLogger logger = FontUtilities.getLogger(); FontUtilities.logInfo("file=" + fileName +
logger.info("file=" + fileName +
" xlfd=" + fontPart); " xlfd=" + fontPart);
logger.info("fontID=" + fontID + FontUtilities.logInfo("fontID=" + fontID +
" sVal=" + sVal); " sVal=" + sVal);
} }
String fullPath = null; String fullPath = null;
@ -394,16 +391,14 @@ public final class X11FontManager extends FcFontManager {
} }
Vector<String> xVal = xlfdMap.get(fullPath); Vector<String> xVal = xlfdMap.get(fullPath);
if (FontUtilities.debugFonts()) { if (FontUtilities.debugFonts()) {
FontUtilities.getLogger() FontUtilities.logInfo("fullPath=" + fullPath +
.info("fullPath=" + fullPath + " xVal=" + xVal);
" xVal=" + xVal);
} }
if ((xVal == null || !xVal.contains(fontPart)) && if ((xVal == null || !xVal.contains(fontPart)) &&
(sVal == null) || !sVal.startsWith("/")) { (sVal == null) || !sVal.startsWith("/")) {
if (FontUtilities.debugFonts()) { if (FontUtilities.debugFonts()) {
FontUtilities.getLogger() FontUtilities.logInfo("Map fontID:"+fontID +
.info("Map fontID:"+fontID + "to file:" + fullPath);
"to file:" + fullPath);
} }
fontNameMap.put(fontID, fullPath); fontNameMap.put(fontID, fullPath);
if (xVal == null) { if (xVal == null) {
@ -481,8 +476,7 @@ public final class X11FontManager extends FcFontManager {
if (hyphenCnt != 14) { if (hyphenCnt != 14) {
if (FontUtilities.debugFonts()) { if (FontUtilities.debugFonts()) {
FontUtilities.getLogger() FontUtilities.logSevere("Font Configuration Font ID is malformed:" + name);
.severe("Font Configuration Font ID is malformed:" + name);
} }
return name; // what else can we do? return name; // what else can we do?
} }
@ -511,8 +505,7 @@ public final class X11FontManager extends FcFontManager {
if (hyphenCnt != 14) { if (hyphenCnt != 14) {
if (FontUtilities.debugFonts()) { if (FontUtilities.debugFonts()) {
FontUtilities.getLogger() FontUtilities.logSevere("Font Configuration Font ID is malformed:" + name);
.severe("Font Configuration Font ID is malformed:" + name);
} }
return name; // what else can we do? return name; // what else can we do?
} }
@ -675,7 +668,7 @@ public final class X11FontManager extends FcFontManager {
if (FontUtilities.debugFonts() && fontConfigDirs != null) { if (FontUtilities.debugFonts() && fontConfigDirs != null) {
String[] names = fontConfigDirs.toArray(new String[0]); String[] names = fontConfigDirs.toArray(new String[0]);
for (int i=0;i<names.length;i++) { for (int i=0;i<names.length;i++) {
FontUtilities.getLogger().info("awtfontpath : " + names[i]); FontUtilities.logInfo("awtfontpath : " + names[i]);
} }
} }
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2008, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -540,8 +540,7 @@ public class FcFontConfiguration extends FontConfiguration {
} }
if (FontUtilities.debugFonts()) { if (FontUtilities.debugFonts()) {
PlatformLogger logger = FontUtilities.getLogger(); FontUtilities.logInfo("successfully parsed the fontconfig file at " + fcFile.toString());
logger.info("successfully parsed the fontconfig file at " + fcFile.toString());
} }
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2008, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -195,9 +195,7 @@ public class FontConfigManager {
FcCompFont fci = fontArr[i]; FcCompFont fci = fontArr[i];
if (fci.firstFont == null) { if (fci.firstFont == null) {
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
PlatformLogger logger = FontUtilities.getLogger(); FontUtilities.logInfo("Fontconfig returned no font for " + fontArr[i].fcName);
logger.info("Fontconfig returned no font for " +
fontArr[i].fcName);
} }
fontConfigFailed = true; fontConfigFailed = true;
} else if (anyFont == null) { } else if (anyFont == null) {
@ -207,8 +205,7 @@ public class FontConfigManager {
if (anyFont == null) { if (anyFont == null) {
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
PlatformLogger logger = FontUtilities.getLogger(); FontUtilities.logInfo("Fontconfig returned no fonts at all.");
logger.info("Fontconfig returned no fonts at all.");
} }
fontConfigFailed = true; fontConfigFailed = true;
return; return;
@ -223,22 +220,19 @@ public class FontConfigManager {
fontConfigFonts = fontArr; fontConfigFonts = fontArr;
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
PlatformLogger logger = FontUtilities.getLogger();
long t1 = System.nanoTime(); long t1 = System.nanoTime();
logger.info("Time spent accessing fontconfig=" FontUtilities.logInfo("Time spent accessing fontconfig="
+ ((t1 - t0) / 1000000) + "ms."); + ((t1 - t0) / 1000000) + "ms.");
for (int i = 0; i< fontConfigFonts.length; i++) { for (int i = 0; i< fontConfigFonts.length; i++) {
FcCompFont fci = fontConfigFonts[i]; FcCompFont fci = fontConfigFonts[i];
logger.info("FC font " + fci.fcName+" maps to family " + FontUtilities.logInfo("FC font " + fci.fcName+" maps to family " +
fci.firstFont.familyName + fci.firstFont.familyName +
" in file " + fci.firstFont.fontFile); " in file " + fci.firstFont.fontFile);
if (fci.allFonts != null) { if (fci.allFonts != null) {
for (int f=0;f<fci.allFonts.length;f++) { for (int f=0;f<fci.allFonts.length;f++) {
FontConfigFont fcf = fci.allFonts[f]; FontConfigFont fcf = fci.allFonts[f];
logger.info("Family=" + fcf.familyName + FontUtilities.logInfo("Family=" + fcf.familyName +
" Style="+ fcf.styleStr + " Style="+ fcf.styleStr +
" Fullname="+fcf.fullName + " Fullname="+fcf.fullName +
" File="+fcf.fontFile); " File="+fcf.fontFile);
@ -360,10 +354,9 @@ public class FontConfigManager {
} }
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger() FontUtilities.logInfo("FC name=" + name + " style=" + style +
.info("FC name=" + name + " style=" + style + " uses " + fcInfo.firstFont.familyName +
" uses " + fcInfo.firstFont.familyName + " in file: " + fcInfo.firstFont.fontFile);
" in file: " + fcInfo.firstFont.fontFile);
} }
if (fcInfo.compFont != null) { if (fcInfo.compFont != null) {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -116,9 +116,8 @@ class NativeStrike extends PhysicalStrike {
pScalerContext = createNullScalerContext(); pScalerContext = createNullScalerContext();
numGlyphs = 0; numGlyphs = 0;
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger() FontUtilities.logSevere("Could not create native strike " +
.severe("Could not create native strike " + new String(nameBytes));
new String(nameBytes));
} }
return; return;
} }