Uploaded image for project: 'Batik'
  1. Batik
  2. BATIK-964

Generated style does not include units for font size

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: None
    • Component/s: SVGGraphics2D
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: All

      Description

      I generated some an SVG document using the SVGGraphics2D Java class. I first displayed the document in Safari which showed everything as expected, with the text in the right size. Trying the same in Firefox 3.6 and Opera 10.63 on MacOS X resulted in the text being the wrong size.

      Looking at the source of the generated document I noticed that the font-size has no unit:

      <g style="font-family:'Arial'; font-size:10;">

      Changing the style by hand to include the unit resolves the font size issue in both Firefox and Opera:

      <g style="font-family:'Arial'; font-size:10px;">

        Attachments

        1. FontSizeTestCase.java
          1 kB
          Andre-John Mas

          Activity

            People

            • Assignee:
              batik-dev@xmlgraphics.apache.org Batik Developer's Mailing list
              Reporter:
              ajmas Andre-John Mas
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: