Re: [xep-support] Font names with parentheses in them

From: Justin Lipton <justin.lipton@exari.com>
Date: Wed May 09 2007 - 23:29:30 PDT
A bit more information if I quote the declaration e.g.

font-family="&quot;OCR-B (CBA)&quot;, Symbol, serif"

I get the following Exception:

java.lang.RuntimeException: com.renderx.fonts.BadFontDataException: Could not obtain font metric for font family 'OCR-B (CBA)'
    at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3363)
    at org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:427)
    at com.renderx.sax.SAXStorage$EndDocumentRecord.play(Unknown Source)
    at com.renderx.sax.SAXStorage.play(Unknown Source)
    at com.renderx.xep.FormatterCore$ContentHandlerDriver.endDocument(Unknown Source)


Justin Lipton wrote:
Hi,

Of late our good friends at Microsoft have taken to putting parentheses in font names - "Arial (W1)" is an example that keeps coming up.
Unfortunately these seems to break XEP 4.9

Here's the font definition fragment from my xep.xml

<font-group xml:base="file:/tmp/" label="Windows TrueType" embed="true" subset="true">
        <font-family name="OCR-B (CBA)">
            <font><font-data ttf="TT0646Z_.ttf"/></font>
        </font-family>
</font-group>

My relevant xsl:fo fragment looks like this:

<fo:block id="Paragraph_2" background-color="transparent" 
space-before="0pt" space-after="1.0E-4pt" line-height="120%"
 color="black" margin-right="0pt" margin-left="0pt" font-size="12pt" 
font-family="OCR-B (CBA), Symbol, serif" font-weight="normal" 
text-align="left" text-indent="0pt" white-space-collapse="false">
BTW OCR-B (CBA) rocks </fo:block>

XEP Warnings are:

XEP Warning: Unexpected token in font-family: FUNCTOR
XEP Warning: Unexpected token in font-family: RIGHT PARENTHESIS

and I get no PDF output.

I've also tried escaping the parentheses:
<fo:block id="Paragraph_2" background-color="transparent"
space-before="0pt" space-after="1.0E-4pt" line-height="120%"
color="black" margin-right="0pt" margin-left="0pt" font-size="12pt"
font-family="OCR-B \(CBA\), Symbol, serif" font-weight="normal"
text-align="left" text-indent="0pt" white-space-collapse="false">BTW
OCR-B (CBA) rocks </fo:block>

to no avail.

Renaming the font to remove the parentheses resolves the issue.
Is this a bug? - Any help would be appreciated.

Regards,
Justin.


--
Exari Signature

Justin Lipton
justin.lipton@exari.com
Level 7, 10-16 Queen Street, Melbourne 3000 Australia
Tel +61 3 9621 2775 | Fax +61 3 9621 2776

Exari Systems
London | Melbourne | San Francisco
www.exari.com

Really Important Notice
Actually, this is only important if this email was sent to you by mistake or if someone sent it to you when they shouldn't have. If you got it by mistake, please reply and tell us so we can re-send it to the right person. If you got it from someone who should know better, please tell them they're in big trouble. In either case, please don't forward it on to anyone else. Or print it. Or talk about it. Otherwise you'll be in big trouble too.

exari logo

!DSPAM:4642a974263135773315904!

--
Exari Signature

Justin Lipton
justin.lipton@exari.com
Level 7, 10-16 Queen Street, Melbourne 3000 Australia
Tel +61 3 9621 2775 | Fax +61 3 9621 2776

Exari Systems
London | Melbourne | San Francisco
www.exari.com

Really Important Notice
Actually, this is only important if this email was sent to you by mistake or if someone sent it to you when they shouldn't have. If you got it by mistake, please reply and tell us so we can re-send it to the right person. If you got it from someone who should know better, please tell them they're in big trouble. In either case, please don't forward it on to anyone else. Or print it. Or talk about it. Otherwise you'll be in big trouble too.

exari logo

-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html

picture exari-clr-24.gif
Received on Thu May 10 00:31:52 2007

This archive was generated by hypermail 2.1.8 : Thu May 10 2007 - 00:31:53 PDT