From 97f3728a5c3c860f38217cc3e09a5cf30095fcf8 Mon Sep 17 00:00:00 2001 From: Adrian Cumiskey Date: Thu, 17 Jul 2008 17:40:12 +0000 Subject: [PATCH] A minor optimization. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@677649 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/fop/layoutmgr/inline/InlineLayoutManager.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java index d0874d626..589fb2645 100755 --- a/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java @@ -36,6 +36,7 @@ import org.apache.fop.fo.flow.InlineLevel; import org.apache.fop.fo.flow.Leader; import org.apache.fop.fo.pagination.Title; import org.apache.fop.fo.properties.CommonBorderPaddingBackground; +import org.apache.fop.fo.properties.CommonFont; import org.apache.fop.fo.properties.CommonMarginInline; import org.apache.fop.fo.properties.SpaceProperty; import org.apache.fop.fonts.Font; @@ -115,9 +116,12 @@ public class InlineLayoutManager extends InlineStackingLayoutManager { InlineLevel fobj = (InlineLevel) this.fobj; int padding = 0; + FontInfo fi = fobj.getFOEventHandler().getFontInfo(); - FontTriplet[] fontkeys = fobj.getCommonFont().getFontState(fi); - font = fi.getFontInstance(fontkeys[0], fobj.getCommonFont().fontSize.getValue(this)); + CommonFont commonFont = fobj.getCommonFont(); + FontTriplet[] fontkeys = commonFont.getFontState(fi); + font = fi.getFontInstance(fontkeys[0], commonFont.fontSize.getValue(this)); + lineHeight = fobj.getLineHeight(); borderProps = fobj.getCommonBorderPaddingBackground(); inlineProps = fobj.getCommonMarginInline(); -- 2.39.5