From 24c0cd4c625a9248361bd7b53546e5613ed86c26 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Mon, 13 Nov 2006 17:49:12 +0000 Subject: [PATCH] Tweaking performance a bit. 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 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/java/org/apache/fop/fonts/type1/PFMFile.java b/src/java/org/apache/fop/fonts/type1/PFMFile.java index b2d2ee933..ed9c9eeb0 100644 --- a/src/java/org/apache/fop/fonts/type1/PFMFile.java +++ b/src/java/org/apache/fop/fonts/type1/PFMFile.java @@ -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); -- 2.39.5