[xep-support] Scaling content to fit a block

Michael Sulyaev msulyaev at renderx.com
Tue Apr 21 07:15:01 PDT 2009


Robert Goldsmith wrote:
> Does anyone know if it is possible to scale text content to fit a block?

Hello Robert,
XSL FO does not provide a way to achieve it.

> I have an fo:block of a set size and I need to be able to scale the 
> font-size of variable content to fit the space without wrapping. Any ideas?

IMHO, no chance. If the content is pure text, it could probably be 
possible to: estimate the area required by the content at given 
font-size, compare it to the space provided by the containing 
block(-container), alter the font-size accordingly. All in XSLT (there 
even is an sqrt routine, googlable). However: breaking text into lines 
may not happen at arbitrary places. This is likely to spoil everything.

Why would you need to store arbitrary content in a fixed box?

Regards,
Michael Sulyaev
RenderX


-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo at renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html



More information about the Xep-support mailing list