Re: [xsl] XSL:FO dynamic font size based on width

Subject: Re: [xsl] XSL:FO dynamic font size based on width
From: Dave Pawson <davep@xxxxxxxxxxxxx>
Date: Thu, 26 Jun 2008 13:56:48 +0100
Wasiq Shaikh wrote:
Hello everyone!

Quick question ...

I have a title of a book (fo:block) that needs to be one line on an 8.5in x
11in page. If the title is too long for the page (overflow), is there a way
to dynamically decrease the font-size so that the entire title is shown on
one line?

Basically, I'm looking for the exact behaviour of PowerPoint's "AutoFit Text
to Placeholder" feature.

No. That would require feedback from the rendering engine to the XSLT. Doesn't happen.

From use, you might determine that you get x chars
'safely' on the line.
Chop the line up based on that and create a number
of lines.

HTH




regards


--
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk

Current Thread