diff options
-rw-r--r-- | src/java/org/apache/fop/fonts/truetype/TTFFile.java | 13 | ||||
-rw-r--r-- | src/java/org/apache/fop/fonts/truetype/TTFFontLoader.java | 2 |
2 files changed, 9 insertions, 6 deletions
diff --git a/src/java/org/apache/fop/fonts/truetype/TTFFile.java b/src/java/org/apache/fop/fonts/truetype/TTFFile.java index fe40c4b33..86a1d75e2 100644 --- a/src/java/org/apache/fop/fonts/truetype/TTFFile.java +++ b/src/java/org/apache/fop/fonts/truetype/TTFFile.java @@ -222,7 +222,9 @@ public class TTFFile { int cmapEID = in.readTTFUShort(); long cmapOffset = in.readTTFULong(); - log.debug("Platform ID: " + cmapPID + " Encoding: " + cmapEID); + if (log.isDebugEnabled()) { + log.debug("Platform ID: " + cmapPID + " Encoding: " + cmapEID); + } if (cmapPID == 3 && cmapEID == 1) { cmapUniOffset = cmapOffset; @@ -230,8 +232,7 @@ public class TTFFile { } if (cmapUniOffset <= 0) { - log.fatal("Unicode cmap table not present"); - log.fatal("Unsupported format: Aborting"); + log.fatal("Unsupported TrueType font: Unicode cmap table not present. Aborting"); return false; } @@ -1333,9 +1334,11 @@ public class TTFFile { if (iObj == null) { // happens for many fonts (Ubuntu font set), // stray entries in the kerning table?? - log.warn("Unicode index (1) not found for glyph " + i); + log.debug("Ignoring kerning pair because no Unicode index was" + + " found for the first glyph " + i); } else if (u2 == null) { - log.warn("Unicode index (2) not found for glyph " + i); + log.debug("Ignoring kerning pair because Unicode index was" + + " found for the second glyph " + i); } else { Map adjTab = (Map)kerningTab.get(iObj); if (adjTab == null) { diff --git a/src/java/org/apache/fop/fonts/truetype/TTFFontLoader.java b/src/java/org/apache/fop/fonts/truetype/TTFFontLoader.java index 5c9e51c81..b29aff808 100644 --- a/src/java/org/apache/fop/fonts/truetype/TTFFontLoader.java +++ b/src/java/org/apache/fop/fonts/truetype/TTFFontLoader.java @@ -57,7 +57,7 @@ public class TTFFontLoader extends FontLoader { FontFileReader reader = new FontFileReader(in); boolean supported = ttf.readFont(reader, null); if (!supported) { - throw new IOException("Could not load TrueType font: " + fontFileURI); + throw new IOException("TrueType font is not supported: " + fontFileURI); } buildFont(ttf); loaded = true; |