]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Do not log a warning when .notdef has been assigned to an unused code of AdobeStandar...
authorVincent Hennebert <vhennebert@apache.org>
Tue, 8 Oct 2013 15:41:25 +0000 (15:41 +0000)
committerVincent Hennebert <vhennebert@apache.org>
Tue, 8 Oct 2013 15:41:25 +0000 (15:41 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1530313 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/fonts/type1/CharMetricsHandler.java

index 8ef17287524b1218eb3a6d4a3c59b79597085273..79753f3f8979809772fb2b4f3d9d4fda5f200027 100644 (file)
@@ -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);