summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Reischenbacher <matthias@apache.org>2015-09-24 20:21:09 +0000
committerMatthias Reischenbacher <matthias@apache.org>2015-09-24 20:21:09 +0000
commitce5a28dd69c65f03014c89462bffdccd1e7cd908 (patch)
treed7403343466bbce47e12bdbbdcad0db7c82bd8bb
parent7b2ece9b5963bf47f17ca5c8aafc5a1cf74ade1b (diff)
downloadxmlgraphics-fop-ce5a28dd69c65f03014c89462bffdccd1e7cd908.tar.gz
xmlgraphics-fop-ce5a28dd69c65f03014c89462bffdccd1e7cd908.zip
FOP-2530: fix performance regression in MultiByteFont.findGlyphIndex as suggested by dvineshkumar@gmail.com
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1705133 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/java/org/apache/fop/fonts/MultiByteFont.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/fonts/MultiByteFont.java b/src/java/org/apache/fop/fonts/MultiByteFont.java
index 22b5116bb..db72bee0c 100644
--- a/src/java/org/apache/fop/fonts/MultiByteFont.java
+++ b/src/java/org/apache/fop/fonts/MultiByteFont.java
@@ -237,6 +237,9 @@ public class MultiByteFont extends CIDFont implements Substitutable, Positionabl
if (idx < NUM_MOST_LIKELY_GLYPHS) {
mostLikelyGlyphs[idx] = retIdx;
}
+ if (retIdx != 0) {
+ break;
+ }
}
}
return retIdx;