From ce86f97648fbc8e168ec9ddb34c5cd340b4ff973 Mon Sep 17 00:00:00 2001 From: Robert Meyer Date: Mon, 17 Feb 2014 09:59:17 +0000 Subject: FOP-2341: Infinite loop when smaller used with a zero length font-size git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1568925 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/fo/properties/FontSizePropertyMaker.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/java/org/apache/fop/fo/properties/FontSizePropertyMaker.java b/src/java/org/apache/fop/fo/properties/FontSizePropertyMaker.java index 72884a177..fe9c64cb7 100644 --- a/src/java/org/apache/fop/fo/properties/FontSizePropertyMaker.java +++ b/src/java/org/apache/fop/fo/properties/FontSizePropertyMaker.java @@ -105,6 +105,9 @@ public class FontSizePropertyMaker // than the last caculated step lastStepFontSize = nextStepFontSize; nextStepFontSize = (int)Math.round(lastStepFontSize * scale); + if (nextStepFontSize == lastStepFontSize) { + break; + } } // baseFontSize is between last and next step font size // Return the step value closer to the baseFontSize -- cgit v1.2.3