aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fonts
diff options
context:
space:
mode:
authorVincent Hennebert <vhennebert@apache.org>2013-10-08 15:41:25 +0000
committerVincent Hennebert <vhennebert@apache.org>2013-10-08 15:41:25 +0000
commit27210ad8307d879b5308450c55bbf80b52f7c6aa (patch)
tree7c39232a6560487672d8be62229b0e0c4411e025 /src/java/org/apache/fop/fonts
parent54aa3369126225b7152d8692796babbc7f79135b (diff)
downloadxmlgraphics-fop-27210ad8307d879b5308450c55bbf80b52f7c6aa.tar.gz
xmlgraphics-fop-27210ad8307d879b5308450c55bbf80b52f7c6aa.zip
Do not log a warning when .notdef has been assigned to an unused code of AdobeStandardEncoding
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1530313 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fonts')
-rw-r--r--src/java/org/apache/fop/fonts/type1/CharMetricsHandler.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/java/org/apache/fop/fonts/type1/CharMetricsHandler.java b/src/java/org/apache/fop/fonts/type1/CharMetricsHandler.java
index 8ef172875..79753f3f8 100644
--- a/src/java/org/apache/fop/fonts/type1/CharMetricsHandler.java
+++ b/src/java/org/apache/fop/fonts/type1/CharMetricsHandler.java
@@ -28,6 +28,8 @@ import java.util.regex.Pattern;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.xmlgraphics.fonts.Glyphs;
+
import org.apache.fop.fonts.NamedCharacter;
import org.apache.fop.fonts.type1.AFMParser.ValueHandler;
@@ -102,9 +104,10 @@ abstract class CharMetricsHandler {
AFMCharMetrics chm = defaultHandler.parse(line, stack, afmFileName);
NamedCharacter namedChar = chm.getCharacter();
if (namedChar != null) {
- int codePoint = AdobeStandardEncoding.getAdobeCodePoint(namedChar.getName());
- if (chm.getCharCode() != codePoint) {
- LOG.info(afmFileName + ": named character '" + namedChar.getName() + "'"
+ String charName = namedChar.getName();
+ int codePoint = AdobeStandardEncoding.getAdobeCodePoint(charName);
+ if (chm.getCharCode() != codePoint && !Glyphs.NOTDEF.equals(charName)) {
+ LOG.info(afmFileName + ": named character '" + charName + "'"
+ " has an incorrect code point: " + chm.getCharCode()
+ ". Changed to " + codePoint);
chm.setCharCode(codePoint);