On 17.09.2004 21:08:30 Clay Leeds wrote:On the FONT front, was anyone successfully used barcode fonts with FOP?
Where can I obtain barcode fonts? I found a link[2] and I'll try some
of the files there.
I've tried both 3 of 9 fonts from [2] and [3] and the Code128 font from
[2]. All work fine, although the TTF font causes two warnings because of
missing TTF tables.
Works for me now, see below...
UPDATE: I've been trying, but I'm getting errors ('[ERROR] unknown font
Code128JK_A,normal,normal so defaulted font to any' or '[ERROR] unknown
font FREE3OF9,normal,normal so defaulted font to any', depending on the
FONT I'm trying to use). I downloaded a barcode font from here[3], and
followed the instructions on the FOP Font Page[4].
Here's the relevant portion of my conf/userconfig.xml file:
<entry> <key>fontBaseDir</key> <value>/Users/Shared/_WebDLs/barcode_fonts</value> </entry>
<fonts> <!-- snipped commented section(s) --> <font RENAME_FILE_TO_USE_metrics-file="A8______.XML" embed-file="barfonts/pfb/A8______.pfm" kerning="yes">
embed-file takes the PFB, not the PFM!!! The PFM is only for generating the font metrics XML. The PFB contains the actual font.
Thanks! I didn't know which part I needed to include there. Now that I look back at the Fonts page, there is an example which has .pfb. Sorry.
It doesn't make a big difference but set kerning to "no".
Done!
<font-triplet name="Code128JK_A" style="normal" weight="normal"/>
</font>
<font RENAME_FILE_TO_USE_metrics-file="FREE3OF9.XML" RENAME_FILE_TO_USE_embed-file="free3of9/FREE3OF9.TTF"
kerning="yes">
<font-triplet name="FREE3OF9" style="normal" weight="normal"/>
</font>
</fonts>
This is the relevant XSL-FO for using the PFM:
<fo:block font-family="Code128JK_A">F62P<fo:page-number/>-0704</fo:block>
Works for me.
Since I was having trouble using the PostScript font, I tried using TTF. This is the relevant XSL-FO for using the TTF:
<fo:block font-family="FREE3OF9">F62P<fo:page-number/>-0704</fo:block>
Please let me know if I need to provide any other info.
Dumb question: Have you supplied the userconfig.xml on the command-line?
That's my only explanation for your problem. If I omit the
userconfig.xml I get your error messages. Besides that I've done nothing
special while generating the XML metrics. I've used practically the same
configuration (including fontBaseDir). I've even copied snippets from
your e-mail to reproduce the problems.
Jeremias Maerki
That was the culprit, so I guess it wasn't a dumb question. It was me being dumb not including the config file. My only 'excuse' is to say that I've never had to use a config file before now (although I'll be using it in the future to play with strokeSVGText...)
Thanks Jeremias!
Web Maestro Clay
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]