diff --git a/jasperreports/src/net/sf/jasperreports/engine/util/JRStyledTextUtil.java b/jasperreports/src/net/sf/jasperreports/engine/util/JRStyledTextUtil.java index fd60abfbae..ccd9e0ccea 100644 --- a/jasperreports/src/net/sf/jasperreports/engine/util/JRStyledTextUtil.java +++ b/jasperreports/src/net/sf/jasperreports/engine/util/JRStyledTextUtil.java @@ -400,6 +400,8 @@ protected FontMatch fontMatchRun(String text, int startIndex, int endIndex, List { codePoint = textChar; } + + boolean stopSearching = false; for (ListIterator fontIt = validFonts.listIterator(); fontIt.hasNext();) { @@ -407,9 +409,16 @@ protected FontMatch fontMatchRun(String text, int startIndex, int endIndex, List if (!face.supports(codePoint)) { + if (lastValid != null) { + stopSearching = true; + break; + } fontIt.remove(); } } + if (stopSearching) { + break; + } if (validFonts.isEmpty()) {