]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Tweaking performance a bit.
authorJeremias Maerki <jeremias@apache.org>
Mon, 13 Nov 2006 17:49:12 +0000 (17:49 +0000)
committerJeremias Maerki <jeremias@apache.org>
Mon, 13 Nov 2006 17:49:12 +0000 (17:49 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@474414 13f79535-47bb-0310-9956-ffa450edef68

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

index b2d2ee9336d6f5e51a024cef60009b36ad60c9ad..ed9c9eeb01e72da89534c2c4d867bd0e747d1543 100644 (file)
@@ -20,7 +20,6 @@
 package org.apache.fop.fonts.type1;
 
 // Java
-import java.io.BufferedInputStream;
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.InputStream;
@@ -191,7 +190,9 @@ public class PFMFile {
         int i = inStream.readShort();
 
 
-        log.info(i + " kerning pairs");
+        if (log.isInfoEnabled()) {
+            log.info(i + " kerning pairs");
+        }
         while (i > 0) {
             int g1 = (int)inStream.readByte();
             i--;
@@ -202,9 +203,9 @@ public class PFMFile {
             if (adj > 0x8000) {
                 adj = -(0x10000 - adj);
             }
-            log.debug("Char no: (" + g1 + ", " + g2 + ") kern: " + adj);
 
             if (log.isDebugEnabled()) {
+                log.debug("Char no: (" + g1 + ", " + g2 + ") kern: " + adj);
                 final String glyph1 = Glyphs.TEX8R_GLYPH_NAMES[g1];
                 final String glyph2 = Glyphs.TEX8R_GLYPH_NAMES[g2];
                 log.debug("glyphs: " + glyph1 + ", " + glyph2);