You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by samea <in...@samea.de> on 2009/09/14 16:53:06 UTC
inline-progression-dimension / block-progression-dimension maybe
doesn't work
Hello,
I tried to squize some characters if the content is to much for the
table-cell.
I have seem a sample at zvon.org
http://www.zvon.org/HowTo/Data/xslfoTests/results/recarea8.pdf.
If I use the script with the FOP 0.95 it doesn' t work.
What's wrong here?
Thanks for you help.
br
Makrus
--
View this message in context: http://www.nabble.com/inline-progression-dimension---block-progression-dimension-maybe-doesn%27t-work-tp25437260p25437260.html
Sent from the FOP - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: inline-progression-dimension / block-progression-dimension maybe doesn't work
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Agreed. Adjusting letter-space automatically depending on the available
space is not always seen as typographically "nice" which is why FOP
doesn't do it by default. By playing with
letter-spacing.minimum/.optimum/.maximum you can get you a certain
flexibility. But that has only limited effect when text is left-aligned.
It works best on justified text where our layout algorithm makes full
use of letter space shrinking/expanding.
On 14.09.2009 18:58:16 Jonathan Levinson wrote:
> inline-progression-dimension specifies the inline-progression-dimension
> of the content-rectangle.
>
> The XSL-FO standard does not say a conforming implementation will
> squeeze characters to fit. In the example you gave, it looks like the
> formatter was adjusting the letter-spacing negatively.
>
> http://www.w3schools.com/xslfo/prop_letter-spacing.asp
>
> You might be able to emulate this formatting behavior (which does not
> seem to be mandated by the standard) by filtering your input string
> using XSLT, multiplying the point-size of the font by the length of the
> string. If this exceeds the inline-progression-dimension, you would
> reduce the letter-spacing appropriately. I haven't tried this myself;
> it is just an idea.
>
> Best Regards,
> Jonathan S. Levinson
>
>
> -----Original Message-----
> From: samea [mailto:info@samea.de]
> Sent: Monday, September 14, 2009 11:40 AM
> To: fop-users@xmlgraphics.apache.org
> Subject: RE: inline-progression-dimension / block-progression-dimension
> maybe doesn't work
>
>
> Hi,
>
> thnaks for your quick answer, but in my case I have to reduce the space
> between the chars. There is only one line to draw, so wrapping or
> hyphenation is not possible. It's a app for businesscards.
>
> Thanks
>
> Markus
>
>
> --
> View this message in context:
> http://www.nabble.com/inline-progression-dimension---block-progression-d
> imension-maybe-doesn%27t-work-tp25437260p25438168.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: inline-progression-dimension / block-progression-dimension
maybe doesn't work
Posted by samea <in...@samea.de>.
Hello Mr. Levinson,
Thanks for your help.
I've done it now by a manipulation of the metric xml.
It's not the elegant way but it works.
Best regards
Markus
--
View this message in context: http://www.nabble.com/inline-progression-dimension---block-progression-dimension-maybe-doesn%27t-work-tp25437260p25453701.html
Sent from the FOP - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: inline-progression-dimension / block-progression-dimension maybe doesn't work
Posted by Jonathan Levinson <Jo...@intersystems.com>.
inline-progression-dimension specifies the inline-progression-dimension
of the content-rectangle.
The XSL-FO standard does not say a conforming implementation will
squeeze characters to fit. In the example you gave, it looks like the
formatter was adjusting the letter-spacing negatively.
http://www.w3schools.com/xslfo/prop_letter-spacing.asp
You might be able to emulate this formatting behavior (which does not
seem to be mandated by the standard) by filtering your input string
using XSLT, multiplying the point-size of the font by the length of the
string. If this exceeds the inline-progression-dimension, you would
reduce the letter-spacing appropriately. I haven't tried this myself;
it is just an idea.
Best Regards,
Jonathan S. Levinson
-----Original Message-----
From: samea [mailto:info@samea.de]
Sent: Monday, September 14, 2009 11:40 AM
To: fop-users@xmlgraphics.apache.org
Subject: RE: inline-progression-dimension / block-progression-dimension
maybe doesn't work
Hi,
thnaks for your quick answer, but in my case I have to reduce the space
between the chars. There is only one line to draw, so wrapping or
hyphenation is not possible. It's a app for businesscards.
Thanks
Markus
--
View this message in context:
http://www.nabble.com/inline-progression-dimension---block-progression-d
imension-maybe-doesn%27t-work-tp25437260p25438168.html
Sent from the FOP - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: inline-progression-dimension / block-progression-dimension
maybe doesn't work
Posted by samea <in...@samea.de>.
Hi,
thnaks for your quick answer, but in my case I have to reduce the space
between the chars. There is only one line to draw, so wrapping or
hyphenation is not possible. It's a app for businesscards.
Thanks
Markus
--
View this message in context: http://www.nabble.com/inline-progression-dimension---block-progression-dimension-maybe-doesn%27t-work-tp25437260p25438168.html
Sent from the FOP - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: inline-progression-dimension / block-progression-dimension maybe doesn't work
Posted by Jonathan Levinson <Jo...@intersystems.com>.
Here is the FOP FAQ regarding cells overflowing in a table.
http://xmlgraphics.apache.org/fop/faq.html#cells-overflow
I haven't tried squeezing characters (not in the above FAQ), but I have
written a template to insert zero-length characters:
<xsl:template name="insert-zero-width-spaces">
<xsl:param name="text" select="."/>
<xsl:param name="i" select="1"/>
<xsl:choose>
<xsl:when test='$i>=string-length($text)'>
<xsl:value-of select="$text"/>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="insert-zero-width-spaces">
<xsl:with-param name="text"
select="concat(substring($text,1,$i),'​',substring($text,$i+1,str
ing-length($text)-$i))"/>
<xsl:with-param name="i" select="$i+2"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
This results in wrapping. I haven't yet tried wrapping using
hyphenation, though hyphenation would be more desirable.
Best Regards,
Jonathan S. Levinson
-----Original Message-----
From: samea [mailto:info@samea.de]
Sent: Monday, September 14, 2009 10:53 AM
To: fop-users@xmlgraphics.apache.org
Subject: inline-progression-dimension / block-progression-dimension
maybe doesn't work
Hello,
I tried to squize some characters if the content is to much for the
table-cell.
I have seem a sample at zvon.org
http://www.zvon.org/HowTo/Data/xslfoTests/results/recarea8.pdf.
If I use the script with the FOP 0.95 it doesn' t work.
What's wrong here?
Thanks for you help.
br
Makrus
--
View this message in context:
http://www.nabble.com/inline-progression-dimension---block-progression-d
imension-maybe-doesn%27t-work-tp25437260p25437260.html
Sent from the FOP - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org