diff options
author | Andreas L. Delmelle <adelmelle@apache.org> | 2007-09-21 22:51:22 +0000 |
---|---|---|
committer | Andreas L. Delmelle <adelmelle@apache.org> | 2007-09-21 22:51:22 +0000 |
commit | 6045d497f24d10551dba6c4c153e057c08204253 (patch) | |
tree | c20d4cccd101bee3f76a71d0107f9bf1ea87693c /src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java | |
parent | 901f7ecc09479f0e40c44453ce5d905aca355556 (diff) | |
download | xmlgraphics-fop-6045d497f24d10551dba6c4c153e057c08204253.tar.gz xmlgraphics-fop-6045d497f24d10551dba6c4c153e057c08204253.zip |
PropertyCache phase 2:
* improvement of the PropertyCache itself should guarantee acceptable
performance of the static caches in multi-session environments, which is
a possible problem with synchronizedMap
* changed CommonFont to use the cache:
added CachedCommonFont to contain the properties that are always cacheable
CommonFont itself is only cached if the remaining properties are absolutes
* changed CommonHyphenation, KeepProperty, ColorProperty and FontFamilyProperty
to use the cache
Facilitate the implementation for font-selection-strategy:
* Changed FontInfo.fontLookup to always return an array of FontTriplet
* Changed CommonFont.getFontState to return an array of FontTriplet
* Initial modifications to the related LMs: initialized with
the font corresponding to the first of the triplets
This line, and those below, will be ignored--
M src/java/org/apache/fop/render/rtf/TextAttributesConverter.java
M src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java
M src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java
M src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLayoutManager.java
M src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
M src/java/org/apache/fop/layoutmgr/inline/PageNumberLayoutManager.java
M src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
M src/java/org/apache/fop/layoutmgr/inline/CharacterLayoutManager.java
M src/java/org/apache/fop/layoutmgr/inline/LeaderLayoutManager.java
M src/java/org/apache/fop/fonts/FontInfo.java
M src/java/org/apache/fop/fo/properties/CommonHyphenation.java
M src/java/org/apache/fop/fo/properties/CommonAccessibility.java
M src/java/org/apache/fop/fo/properties/CompoundPropertyMaker.java
M src/java/org/apache/fop/fo/properties/FontFamilyProperty.java
M src/java/org/apache/fop/fo/properties/FixedLength.java
M src/java/org/apache/fop/fo/properties/PropertyCache.java
M src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java
M src/java/org/apache/fop/fo/properties/CommonFont.java
M src/java/org/apache/fop/fo/properties/ColorProperty.java
M src/java/org/apache/fop/fo/properties/KeepProperty.java
M src/java/org/apache/fop/fo/PropertyList.java
M src/java/org/apache/fop/fo/FOPropertyMapping.java
M src/java/org/apache/fop/fo/expr/PropertyParser.java
M src/java/org/apache/fop/fo/expr/ICCColorFunction.java
M src/java/org/apache/fop/fo/expr/CMYKcolorFunction.java
M src/java/org/apache/fop/fo/expr/RGBColorFunction.java
M src/java/org/apache/fop/fo/expr/SystemColorFunction.java
M status.xml
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@578311 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java')
-rwxr-xr-x | src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java index 30402a5f2..e9b6c19ec 100755 --- a/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java @@ -39,6 +39,8 @@ import org.apache.fop.fo.properties.CommonBorderPaddingBackground; import org.apache.fop.fo.properties.CommonMarginInline; import org.apache.fop.fo.properties.SpaceProperty; import org.apache.fop.fonts.Font; +import org.apache.fop.fonts.FontInfo; +import org.apache.fop.fonts.FontTriplet; import org.apache.fop.layoutmgr.BlockKnuthSequence; import org.apache.fop.layoutmgr.BlockLevelLayoutManager; import org.apache.fop.layoutmgr.BreakElement; @@ -87,6 +89,8 @@ public class InlineLayoutManager extends InlineStackingLayoutManager { protected int dominantBaseline; /** The line height property */ protected SpaceProperty lineHeight; + /** The keep-together property */ + //private KeepProperty keepTogether; private AlignmentContext alignmentContext = null; @@ -110,7 +114,9 @@ public class InlineLayoutManager extends InlineStackingLayoutManager { /** {@inheritDoc} */ public void initialize() { int padding = 0; - font = fobj.getCommonFont().getFontState(fobj.getFOEventHandler().getFontInfo(), this); + FontInfo fi = fobj.getFOEventHandler().getFontInfo(); + FontTriplet[] fontkeys = fobj.getCommonFont().getFontState(fi); + font = fi.getFontInstance(fontkeys[0], fobj.getCommonFont().fontSize.getValue(this)); lineHeight = fobj.getLineHeight(); borderProps = fobj.getCommonBorderPaddingBackground(); inlineProps = fobj.getCommonMarginInline(); |