From: Vincent Hennebert Date: Tue, 8 Oct 2013 15:41:25 +0000 (+0000) Subject: Do not log a warning when .notdef has been assigned to an unused code of AdobeStandar... X-Git-Tag: fop-2_0~179 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=27210ad8307d879b5308450c55bbf80b52f7c6aa;p=xmlgraphics-fop.git 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 --- 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);