From ce5a28dd69c65f03014c89462bffdccd1e7cd908 Mon Sep 17 00:00:00 2001 From: Matthias Reischenbacher Date: Thu, 24 Sep 2015 20:21:09 +0000 Subject: [PATCH] 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 --- src/java/org/apache/fop/fonts/MultiByteFont.java | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.39.5