How would you handle "Catering for proportional fonts"? We are using substring(...) with a proportional font, and it looks bad.
> -----Original Message----- > From: J.Pietschmann [mailto:[EMAIL PROTECTED] > Sent: Sunday, June 16, 2002 8:11 AM > To: [EMAIL PROTECTED] > Subject: Re: Control of long words inside a table cell > > > Filippos Slavik wrote: > > Hello all, > > > > Actually I have the opposite problem. I'm too having some long > words inside a > > table cell, but since my table-columns have a fixed width I > would like to > > have the content of the cell to be truncated in the case of a > "long word". > > What I did was to use <fo:table-cell wrap-option="no-wrap"> to > dissallow the > > cell's contents to be wrapped. But what FOP did was to "shrink" > enough the > > "gap" between each character so the "long word" could fit in > the block area > > within the cell. > > > > I was unable to locate any hint in the list's archives, > therefore I'm asking.. > > if it's possible to truncate the cell's contents to a specific > and fixed > > width size ? (ex: If the cell's content would be normaly > "Filippos Slavik", > > but the font-size and/or the cell width is not big enough to > hold the entire > > string, I would like a "Filippos Sla" string to appear in the > generated PDF > > instead). > > The XSLFO specification provides the wrap-option and the > overflow property to control this. Unfortunately, FOP > doesn't yet implement the overflow="hidden" setting. > You can try to clip long content at the XSLT level, > for example > <fo:block> > <xsl:value-of select="substring(.,30)"/> > </fo:block> > or whatever matches your problem. Catering for proportional > fonts will take a bit of work. > > J.Pietschmann >