Re: [XSL-FO] How is Baseline Position Determined?
- At 2006-01-24 16:34 -0600, Eliot Kimber wrote:
>I'm trying to translate design specs that specify baseline-to-baselineThe only quantity that has messed me up in the past is the
>into reliable FO specifications and I'm finding that it may not be possible.
>What I need to be able to do is predict where the baseline for a given
>line of text, usually the first line in a block, will fall relative to
>the before or after edge of the block.
>If I understand the spec, the "baseline start point" is formatter
>determined (Clause 4.5 Line-areas).
>If this is the case then there doesn't seem to be a reliable way to
>predict where the baseline will fall.
half-leading, as the default leading value is implementation
defined. I've taken control by specifying line height explicitly and
then obtained closer results between tools.
But I confess that I haven't had to count pixels, so I don't know if
there is a nuance I've missed.
>Is my analysis correct (that baseline is unpredicatable) or have IBefore and after each line the formatter will allocate half of the
>missed a subtlety somewhere?
leading (a kewl method of accommodating successive lines with
different font sizes).
I wonder if you changed line height to "1" (scalars are allowed as
indications of factor of the font size) if you would get closer
results because there would then be no leading.
I hope this helps.
. . . . . . . . . . . . Ken
Upcoming XSLT/XSL-FO hands-on courses: Denver,CO March 13-17,2006
World-wide on-site corporate, govt. & user group XML/XSL training.
G. Ken Holman mailto:gkholman@...
Crane Softwrights Ltd. http://www.CraneSoftwrights.com/f/
Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995)
Male Cancer Awareness Aug'05 http://www.CraneSoftwrights.com/f/bc
Legal business disclaimers: http://www.CraneSoftwrights.com/legal
- Eliot Kimber wrote:
> I'm trying to translate design specs that specify baseline-to-baselineI just realized that it doesn't really matter where the baseline as long
> into reliable FO specifications and I'm finding that it may not be possible.
as you know the line-height of the lines in the blocks involved.
For example, imagine you have two blocks, one with a line height of 12
points and one with a line height of 18 points and you want a nominal
baseline-to-baseline distance of 36 points between the last line of the
first block (block A) and the first line of the second block (B). I
think that this formula will always work:
b-to-b - (line-height-A/2 + line-height-B/2)
This is because the relative positioning of the baselines of both lines
involved will be the same, regardless of where they actually are placed.
The bigger challenge would be when the layout is designed in terms of
distances from a fixed edge to the baseline, top of x-height, or top of
cap height of a line. That seems to still be unknowable.
W. Eliot Kimber
9390 Research Blvd, #410
Austin, TX 78759