< prev index next >
src/java.desktop/share/classes/sun/font/FileFontStrike.java
Print this page
rev 60042 : 8248802: Add log helper methods to FontUtilities.java
@@ -221,12 +221,11 @@
matrix[0] >= 3.0 && matrix[0] <= 100.0) &&
!((TrueTypeFont)fileFont).useEmbeddedBitmapsForSize(intPtSize)) {
useNatives = true;
}
if (FontUtilities.isLogging() && FontUtilities.isWindows) {
- FontUtilities.getLogger().info
- ("Strike for " + fileFont + " at size = " + intPtSize +
+ FontUtilities.logInfo("Strike for " + fileFont + " at size = " + intPtSize +
" use natives = " + useNatives +
" useJavaRasteriser = " + fileFont.useJavaRasterizer +
" AAHint = " + desc.aaHint +
" Has Embedded bitmaps = " +
((TrueTypeFont)fileFont).
@@ -317,12 +316,11 @@
StrikeCache.unsafe.putFloat(ptr + StrikeCache.xAdvanceOffset,
advance);
return ptr;
} else {
if (FontUtilities.isLogging()) {
- FontUtilities.getLogger().warning(
- "Failed to render glyph using GDI: code=" + glyphCode
+ FontUtilities.logWarning("Failed to render glyph using GDI: code=" + glyphCode
+ ", fontFamily=" + family + ", style=" + style
+ ", size=" + size);
}
return fileFont.getGlyphImage(pScalerContext, glyphCode);
}
@@ -354,18 +352,17 @@
return glyphPtr;
} else {
if (useNatives) {
glyphPtr = getGlyphImageFromNative(glyphCode);
if (glyphPtr == 0L && FontUtilities.isLogging()) {
- FontUtilities.getLogger().info
- ("Strike for " + fileFont +
+ FontUtilities.logInfo("Strike for " + fileFont +
" at size = " + intPtSize +
" couldn't get native glyph for code = " + glyphCode);
}
- } if (glyphPtr == 0L) {
- glyphPtr = fileFont.getGlyphImage(pScalerContext,
- glyphCode);
+ }
+ if (glyphPtr == 0L) {
+ glyphPtr = fileFont.getGlyphImage(pScalerContext, glyphCode);
}
return setCachedGlyphPtr(glyphCode, glyphPtr);
}
}
< prev index next >