xsl-list
[Top] [All Lists]

Re: [xsl] FO checkbox from 2 inline ZapfDingbat characters

2010-03-24 00:33:07
You can also use a little known trick ....

<fo:block font-size="12pt">
        <fo:inline font-family="ZapfDingbats" 
letter-spacing="-12pt">❏</fo:inline>
        <fo:inline font-family="ZapfDingbats" baseline-shift="2pt">✓</fo:inline>
</fo:block>

You set the letter-spacing to the negative value of the font-size. You may need 
to also adjust the baseline-shift for larger fonts (a little larger).

Kevin Brown
RenderX


--------------------------------------------------------
Date: Tue, 23 Mar 2010 09:23:38 +0000
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
From: Dave Pawson <davep(_at_)dpawson(_dot_)co(_dot_)uk>
Cc: jacobusreyneke(_at_)gmail(_dot_)com
Subject: Re: [xsl] FO checkbox from 2 inline ZapfDingbat characters
Message-ID: <20100323092338(_dot_)5bc8e020(_at_)dpawson(_dot_)co(_dot_)uk>

On Tue, 23 Mar 2010 10:26:03 +0200
Jacobus Reyneke <jacobusreyneke(_at_)gmail(_dot_)com> wrote:

Hi Dave,

I think what Karl means is that he wants to put one character on top
of the other, ie a check mark onto a square, rather than between two
characters. I don't know how this is done, but here are some
alternatives:

Trust Unicode... or listen to Chris on the fop list.
Try U+2611, BALLOT BOX WITH CHECK, or U+2612, BALLOT BOX WITH X.

GIYF

An SVG image may be a good way to go if you really need fancy drop
shadow effects etc. I'm a novice with XSL-FO, but I have found SVG to
be a good alternative for floating objects in XSL-FO.

Dave, is there any reason one should avoid SVG or is it o.k. to mix
and match it with XSL-FO?

No, I can only see SVG usage increasing in xsl-fo in the future. 
It is so useful.

HTH

-- 

regards 

-- 
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--