Peter, It's actually worse than Andreas said: The XSL spec requires that there be no dependencies on the physical rendering. Thus, one simply cannot find out how wide an 'a' is in the current font.
When I have had to do precise copyfitting programmatically, I've transformed the XML to TeX, where copyfitting is possible, if not straightforward. Best of luck, Fred "Peter" <[EMAIL PROTECTED]> 12/02/2006 08:32 PM Please respond to fop-users@xmlgraphics.apache.org To <fop-users@xmlgraphics.apache.org> cc Subject RE: Copyfitting Andreas, Thanks for the reply. I will ping the fop-dev list and see whether anyone is interested in helping me to make an estimate of what it would take to implement in fop (the graphics approach would get me into all kinds of issues with resolution and things which I would rather not deal with). I might not have the time to implement it and I understand it would probably not make it in the main line code (being non standard) but asking never hurts I guess. Peter > -----Original Message----- > From: Andreas L Delmelle [mailto:[EMAIL PROTECTED] > Sent: Saturday, December 02, 2006 10:02 PM > To: fop-users@xmlgraphics.apache.org > Subject: Re: Copyfitting > > On Dec 1, 2006, at 18:02, Peter wrote: > > Hi Peter, > > > I am wondering whether anyone has any experience in the area of > > copyfitting > > and xsl-fo. > > To clarify - assume that I want to format a piece of text in an > > area (page > > if you want) with given dimensions. > > Now, in stead of getting an overflow I would like xsl-fo (fop that > > is :-)) > > to change a number of parameters (like font size etc) to try and > > make the > > text fit in the available region. > > > Would this (or could this made to) match with xsl-fo/fop? > > This type of question has been raised a number of times, and there > does not seem to be a straightforward solution in pure XSL-FO... > Depending on the complexity of layout, you may be able to achieve a > similar effect by mimicking it in SVG, then insert the graphic as an > fo:external-graphic or fo:instream-foreign-object with content-width > and -height set to scale-to-fit. > > Only tough nut to crack would be that the image would, in this case, > also be stretched if it is too small. That's where XSL-FO 1.1 scale- > down-to-fit would be of great help. > > It's not much to go on, just my 2 cents... > > Cheers, > > Andreas > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]