[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [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
 XSL-FO: align alphabetic baseline to a certain value
Hello,

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>"?

Best regards

Christian
*Editura GmbH & Co. KG*
Tempelhofer Damm 2 7 12101 Berlin
www.editura.de
AG Berlin-Charlottenburg 7 HRA 43189 B 7 USt.Id. DE217180548
Geschdftsf|hrer: Ralf Szymanski

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.