aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2008-02-18 16:45:18 +0000
committerJeremias Maerki <jeremias@apache.org>2008-02-18 16:45:18 +0000
commit4189170667e5712e3bf1caf2c7560bccd876d5f2 (patch)
tree1cc20779d514b1f8ea72e28cc1e51cc3c41b23ec
parent76ebc1fa40782c2e6e8e91e51a5440cbc15198f2 (diff)
downloadxmlgraphics-fop-4189170667e5712e3bf1caf2c7560bccd876d5f2.tar.gz
xmlgraphics-fop-4189170667e5712e3bf1caf2c7560bccd876d5f2.zip
Reducing noise. Better messages.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@628804 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/java/org/apache/fop/fonts/truetype/TTFFile.java13
-rw-r--r--src/java/org/apache/fop/fonts/truetype/TTFFontLoader.java2
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;