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

Generic font families shadowed by fonts of the same name

    XMLWordPrintableJSON

    Details

      Description

      If an AWT or SVG font has a name that is the same as a generic font family,
      such as "sans-serif", then using font-family="sans-serif" fails to select the
      generic font family as it should. In this situation, font-family="'sans-
      serif'" would need to be used to select the AWT/SVG font with the name "sans-
      serif".

      Test showing this:

      <svg xmlns='http://www.w3.org/2000/svg' width='480' height='360'>
      <font horiz-adv-x="500">
      <font-face font-family="sans-serif" font-weight="normal"
      units-per-em="1000" ascent="800" descent="200"
      alphabetic="200"/>
      <missing-glyph horiz-adv-x="500"
      d="M0 0L500 0L500 1000L0 1000M50 50L50 950L450 950L450
      50Z"/>
      <glyph unicode="A" glyph-name="square" d="M0 250L500 250L500 750L0 750Z"/>
      </font>
      <g font-size='48' text-anchor='middle'>
      <text x='200' y='150' font-family='sans-serif'>A</text>
      <text x='280' y='150' font-family='"sans-serif"'>A</text>
      </g>
      </svg>

        Attachments

        1. Batik-Bug43564-TestCase.svg
          0.6 kB
          Helder Magalhães

          Activity

            People

            • Assignee:
              batik-dev@xmlgraphics.apache.org Batik Developer's Mailing list
              Reporter:
              cam Cameron McCormack
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: