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

Text containing surrogate pairs painted as paths is wrong

    XMLWordPrintableJSON

    Details

      Description

      If text contains characters from outside the Basic Multilingual Plane, and the
      text is rendered as paths (with text-rendering='geometricPrecision', or having
      some rotation on the text), then the rendered glyphs are wrong. In the example
      at the URL given, the same text string is used twice. The upper text element is
      rendered by the Java2D classes and is done correctly. The lower text element is
      painted as shapes since it has text-rendering='geometricPrecision', but just
      repeats the first glyph over the whole string (although the combining diereses
      are rendered).

      At least in AWTGVTGlyphVector.java:113, the call to glyphVector.getNumGlyphs()
      returns a number that makes it look like java.awt.font.GlyphVector assumes each
      of the two surrogates in a pair are separate glyphs.

      I suspect there are a few places in the code that doesn't handle surrogate pairs
      properly.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated: