]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
FOP-2530: fix performance regression in MultiByteFont.findGlyphIndex as suggested...
authorMatthias Reischenbacher <matthias@apache.org>
Thu, 24 Sep 2015 20:21:09 +0000 (20:21 +0000)
committerMatthias Reischenbacher <matthias@apache.org>
Thu, 24 Sep 2015 20:21:09 +0000 (20:21 +0000)
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

index 22b5116bbf12440cdb63393cc01e9ceb68f7052f..db72bee0c4d132d7c8ec049941f23ab1e6f9d3b7 100644 (file)
@@ -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;