From: Matthias Reischenbacher Date: Thu, 24 Sep 2015 20:21:09 +0000 (+0000) Subject: FOP-2530: fix performance regression in MultiByteFont.findGlyphIndex as suggested... X-Git-Tag: fop-2_1~37 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ce5a28dd69c65f03014c89462bffdccd1e7cd908;p=xmlgraphics-fop.git 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 --- 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;