[XSL-LIST Mailing List Archive Home]
[Reply To This Message]
XSL-FO: align alphabetic baseline to a certain value
Subject: XSL-FO: align alphabetic baseline to a certain value|
From: Christian Kirchhoff <christian.kirchhoff@xxxxxxxxxx>
Date: Wed, 03 Nov 2010 13:24:04 +0100
if I had a xsl-fo document who's paper-height and -width, font sizes
and positions of elements are dynamic, and there was one horizontal
line who's vertical position changes proportional to the paper-height,
too, and there was a single line of text who's baseline should always
match the horizontal line, as if the text was written on it...how
would that be managed in the best way.
In the 1:1 scale, when all the default values are used, the line has a
certain top position, and the text is contained in a block within an
block-container that is positioned fix and the top attribute is set in
a way that the baseline of the text sits exactly on the line.
But if the size of the document is changed, I can recalculate the new
top position of the line in a way that it is proportional to the new
overall size. The same way I could recalculate the top position of the
block-container containing the text.
But: The font size of the text is recalculated as well, thus a smaller
destination size of the document results in a smaller text size. Thus
allthough the top coordinates of both the line and the text are
changed proportionally, the text's font size is no different and thus
it's baseline doesn't necessarily match the horizontal line anymore.
How could I, if I have calculated the top position of the line,
generate the text and the block structure around it in a way that I
can exactly define the psition of the (alphabetic) baseline.
It is maintained externally that the text will not be too long and
break into more than one line. Can I somehow tell the block or the
block-container: "The (alphabetic) baseline for the first line of text
inside you is <x>"?
*Editura GmbH & Co. KG*
Tempelhofer Damm 2 7 12101 Berlin
AG Berlin-Charlottenburg 7 HRA 43189 B 7 USt.Id. DE217180548
Geschdftsf|hrer: Ralf Szymanski
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format