From b5c2cad08dc202898aae3be257a0c7ff6afcf0bb Mon Sep 17 00:00:00 2001 From: Manuel Mall Date: Thu, 11 Jan 2007 13:51:28 +0000 Subject: [PATCH] Added support for line-height-shift-adjustment property git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@495222 13f79535-47bb-0310-9956-ffa450edef68 --- .../content/xdocs/compliance.ihtml | 6 +- .../layoutmgr/inline/LineLayoutManager.java | 15 ++- status.xml | 3 + .../block_line-height-shift-adjustment.xml | 111 ++++++++++++++++++ 4 files changed, 126 insertions(+), 9 deletions(-) create mode 100755 test/layoutengine/standard-testcases/block_line-height-shift-adjustment.xml diff --git a/src/documentation/content/xdocs/compliance.ihtml b/src/documentation/content/xdocs/compliance.ihtml index 60b69b9b7..ac87a6f0b 100644 --- a/src/documentation/content/xdocs/compliance.ihtml +++ b/src/documentation/content/xdocs/compliance.ihtml @@ -3965,11 +3965,11 @@ no - - no + + yes -   + [0.93] Supported in fop-trunk only diff --git a/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java index b3e1e33ba..f4480c4e9 100644 --- a/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java @@ -447,12 +447,15 @@ public class LineLayoutManager extends InlineStackingLayoutManager if (!ac.usesInitialBaselineTable() || ac.getAlignmentBaselineIdentifier() != EN_BEFORE_EDGE && ac.getAlignmentBaselineIdentifier() != EN_AFTER_EDGE) { - int alignmentOffset = ac.getTotalAlignmentBaselineOffset(); - if (alignmentOffset + ac.getAltitude() > lineLead) { - lineLead = alignmentOffset + ac.getAltitude(); - } - if (ac.getDepth() - alignmentOffset > lineFollow) { - lineFollow = ac.getDepth() - alignmentOffset; + if (fobj.getLineHeightShiftAdjustment() == EN_CONSIDER_SHIFTS + || ac.getBaselineShiftValue() == 0) { + int alignmentOffset = ac.getTotalAlignmentBaselineOffset(); + if (alignmentOffset + ac.getAltitude() > lineLead) { + lineLead = alignmentOffset + ac.getAltitude(); + } + if (ac.getDepth() - alignmentOffset > lineFollow) { + lineFollow = ac.getDepth() - alignmentOffset; + } } } else { if (ac.getHeight() > maxIgnoredHeight) { diff --git a/status.xml b/status.xml index 9c20e0433..4b1f1727e 100644 --- a/status.xml +++ b/status.xml @@ -28,6 +28,9 @@ + + Added support for line-height-shift-adjustment property. + Added support for the system property fop.home to cli.Main.getJARList(). diff --git a/test/layoutengine/standard-testcases/block_line-height-shift-adjustment.xml b/test/layoutengine/standard-testcases/block_line-height-shift-adjustment.xml new file mode 100755 index 000000000..65b6b7749 --- /dev/null +++ b/test/layoutengine/standard-testcases/block_line-height-shift-adjustment.xml @@ -0,0 +1,111 @@ + + + + + +

+ This test checks the line-height-shift-adjustment property. +

+
+ + + + + + + + + + + Consider + baseline-shift="sub" + shifts + + + Disregard + baseline-shift="sub" + shifts + + + Consider + baseline-shift="super" + shifts + + + Disregard + baseline-shift="super" + shifts + + + Consider + baseline-shift="30%" + shifts + + + Disregard + baseline-shift="30%" + shifts + + + Consider + baseline-shift="-30%" + shifts + + + Disregard + baseline-shift="-30%" + shifts + + + + + + + + + + + + + + + + + + + + + + +
-- 2.39.5