W3C home > Mailing lists > Public > www-xsl-fo@w3.org > August 2011

Re: Space in Barcode font

From: G. Ken Holman <gkholman@CraneSoftwrights.com>
Date: Wed, 17 Aug 2011 17:46:33 -0500
Message-Id: <>
To: www-xsl-fo@w3.org
At 2011-08-17 04:19 -0700, Martin Abbott wrote:
>I have a Barcode font installed and when I use this in Word, say, to create
>some text a space is correctly show as the Barcode equivalent of that space.
>When I use this font in my stylesheet, whilst text is correctly displayed as
>a barcode, the space within it is shown as a space, not a barcode equivalent
>of a space.

That could be your engine's choice to treat white space as 
"untouched" and simply reposition the following non-white-space 
character at its correct coordinate.

Not that that is correct!  I'm just sayin' that is what might be 
happening.  It came to mind that the tool might be making this 
assumption.  The XSL-FO specification determines that a space belongs 
at a particular point on the page, but I don't think the 
specification mandates how that space is effected on the result.  The 
method of rendering the information the formatter has formatted is 
outside of the XSL-FO specification.

>I've played around with white-space-treatment and even used the Unicode for
>a space but no luck.
>   <fo:block space-before="2cm">
>     <fo:inline font-size="36pt" font-family="3 of 9 Barcode">Some
>   </fo:block>
>Does anyone have any ideas?

Not if the culprit is your XSL-FO engine's interpretation of a space 
character as being the absence of a graphic.

Does your font have a copy of the space character at a different 
location in the character map?  Then you could in your XSLT translate 
the space character of your data to the alternative space character 
with the required glyph.

If you have the tools to edit your font file, you could do this 
yourself by sacrificing one of the characters you plan not to use.

A quick Google search of character sets for 3 of 9 found me this font file:


Note how the space in this font file is, in fact, a space.  This font 
file appears not to offer a non-blank glyph for a space.

I hope this helps.

. . . . . . . . . . . . . Ken

Contact us for world-wide XML consulting & instructor-led training
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/f/
G. Ken Holman                 mailto:gkholman@CraneSoftwrights.com
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal
Received on Wednesday, 17 August 2011 22:47:14 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:58:36 UTC