< prev index next >

src/java.desktop/share/classes/sun/font/TrueTypeGlyphMapper.java

Print this page
rev 60042 : 8248802: Add log helper methods to FontUtilities.java

@@ -72,12 +72,11 @@
             if (glyphCode < numGlyphs ||
                 glyphCode >= FileFontStrike.INVISIBLE_GLYPHS) {
                 return glyphCode;
             } else {
                 if (FontUtilities.isLogging()) {
-                    FontUtilities.getLogger().warning
-                        (font + " out of range glyph id=" +
+                    FontUtilities.logWarning(font + " out of range glyph id=" +
                          Integer.toHexString((int)glyphCode) +
                          " for char " + Integer.toHexString(charCode));
                 }
                 return (char)missingGlyph;
             }

@@ -97,12 +96,11 @@
             if (glyphCode < numGlyphs ||
                 glyphCode >= FileFontStrike.INVISIBLE_GLYPHS) {
                 return glyphCode;
             } else {
                 if (FontUtilities.isLogging()) {
-                    FontUtilities.getLogger().warning
-                        (font + " out of range glyph id=" +
+                    FontUtilities.logWarning(font + " out of range glyph id=" +
                          Integer.toHexString((int)glyphCode) +
                          " for char " + Integer.toHexString(charCode) +
                          " for vs " + Integer.toHexString(variationSelector));
                 }
                 return (char)missingGlyph;

@@ -113,13 +111,14 @@
         }
     }
 
     private void handleBadCMAP() {
         if (FontUtilities.isLogging()) {
-            FontUtilities.getLogger().severe("Null Cmap for " + font +
+            FontUtilities.logSevere("Null Cmap for " + font +
                                       "substituting for this font");
         }
+
         SunFontManager.getInstance().deRegisterBadFont(font);
         /* The next line is not really a solution, but might
          * reduce the exceptions until references to this font2D
          * are gone.
          */
< prev index next >