[prev in list] [next in list] [prev in thread] [next in thread] 

List:       batik-dev
Subject:    DO NOT REPLY [Bug 44828] New: Font Family names with digits in them
From:       bugzilla () apache ! org
Date:       2008-04-15 21:59:37
Message-ID: bug-44828-30099 () https ! issues ! apache ! org/bugzilla/
[Download RAW message or body]

https://issues.apache.org/bugzilla/show_bug.cgi?id=44828

           Summary: Font Family names with digits in them cause Batik to
                    throw exception
           Product: Batik
           Version: 1.7
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: CSS
        AssignedTo: batik-dev@xmlgraphics.apache.org
        ReportedBy: daniel.a.joyce@gmail.com


SVG snippet like the following:

<text>
<tspan font-size="0.5in" x="1in" y="251in" font-family="Avenir LT 35
Light">Avenir LT 35 Light : lte50336.ttf</tspan>
<tspan font-size="0.5in" x="1in" y="252in" font-family="Avenir LT 35 Light">
                      The Quick Red Fox Jumped Over The Lazy Dog
                    </tspan>
</text>

Will cause batik to throw the following exception:

org.w3c.dom.DOMException:
file:/home/djoyce/Desktop/Batik_Font_Testing/fonts/fontsampler.svg:
The attribute "font-family" represents an invalid CSS value ("Avenir LT 35
Light").
Original message:
The "font-family" property does not support integer values.
        at
org.apache.batik.css.engine.CSSEngine.getCascadedStyleMap(CSSEngine.java:784)
        at
org.apache.batik.css.engine.CSSEngine.getComputedStyle(CSSEngine.java:876)
        at
org.apache.batik.bridge.CSSUtilities.getComputedStyle(CSSUtilities.java:82)
        at
org.apache.batik.bridge.CSSUtilities.convertDisplay(CSSUtilities.java:564)
        at
org.apache.batik.bridge.SVGTextElementBridge.fillAttributedStringBuffer(SVGTextElementBridge.java:881)
        at
org.apache.batik.bridge.SVGTextElementBridge.fillAttributedStringBuffer(SVGTextElementBridge.java:936)
        at
org.apache.batik.bridge.SVGTextElementBridge.buildAttributedString(SVGTextElementBridge.java:856)
        at
org.apache.batik.bridge.SVGTextElementBridge.computeLaidoutText(SVGTextElementBridge.java:636)
        at
org.apache.batik.bridge.SVGTextElementBridge.buildGraphicsNode(SVGTextElementBridge.java:292)
        at
org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:224)
        at
org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:171)
        at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:82)
        at
org.apache.batik.swing.svg.GVTTreeBuilder.run(GVTTreeBuilder.java:96)


And instead of using the specified font, a default system font will be used.
Font Family names can contain punctuation AND numerical digits, batik needs to
properly handle these cases. This is the correct font family as reported by the
operating system. It seems batik is being a little too specific when verifying
attribute values for font-family.

From the w3c:

http://www.w3.org/TR/REC-CSS2/fonts.html#font-family-prop


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic