Re: FO checkbox from 2 inline ZapfDingbat characters
Jacobus: > how will something like this be supported on the various FO processors Can't help you there, we only tend to test with our own product :). That said, it basically says lay down one character and then move an additional -"X"pt's to place the next character. Negative values for letter spacing are allowed according to the standard so it really isn't a trick. In fact, this is how many composite characters are composed in several languages. It works perfectly in RenderX. > also in different output mediums. PDF works fine with negative letter spacing and so does our Postscript and PPML output. Our XPS output would also work but you would have to use Truetype fonts and not Adobe fonts with XPS. SVG would work but not how you may think -- RenderX SVG output maps text directly from our intermediate format. Our SVG output would create two different <svg:text> elements at absolute positions, one over the other. AFP would probably not be supported as it doesn't support negative letter spacing, I did not test that. I also don't think that our HTML output would work, it is created much like SVG. The absolute <div>'s would overlap and the second character's <div> would obscure the top one. Note: I would recommend this solution for PDF above all others. Embedding a font subset for one or a few characters is a waste. In fact, many think the solution is to dig out their old copy of Arial Unicode MS just to extract a few characters. That font is copyrighted and users should be aware of use restrictions. It is also huge and would slow rendering time just to dig out one character. Lastly, it includes a huge header that can add 200kb to the size of a PDF for only one character. That is, for FO Renderers that do the right thing according to copyright laws and include all the prologue for the font when embedding as RenderX does. When dealing with PDF and Postscript, there are advantages to try and stay within the base 14 font set when possible. Kevin Brown RenderX ------------------------------ Date: Wed, 24 Mar 2010 09:34:23 +0200 To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx From: Jacobus Reyneke <jacobusreyneke@xxxxxxxxx> Subject: Re: FO checkbox from 2 inline ZapfDingbat characters Message-ID: <226b4e0b1003240034k585d894dk8674e35c86f04d44@xxxxxxxxxxxxxx> > You can also use a little known trick .... > > <fo:block font-size=3D"12pt"> > =C2=A0 =C2=A0 =C2=A0 =C2=A0<fo:inline font-family=3D"ZapfDingbats" letter= -spacing=3D"-12pt">=E2=9D=8F</fo:inline> > =C2=A0 =C2=A0 =C2=A0 =C2=A0<fo:inline font-family=3D"ZapfDingbats" baseli= ne-shift=3D"2pt">=E2=9C=93</fo:inline> > </fo:block> > > You set the letter-spacing to the negative value of the font-size. You ma= y need to also adjust the baseline-shift for larger fonts (a little larger)= . > > Kevin Brown > RenderX Clever Kevin ;-) Out of interest, how will something like this be supported on the various FO processors and also in different output mediums. I suppose only PDF and SVG will deal with this correctly, or am I being stupid again?
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format