Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8113227

LCD Text shader graphics transform problems.

XMLWordPrintable


      * When a scale is applied to a Text node, glyphs are produced in
      device space and the drawing to the graphics should not apply
      the transform. However it appears this does happen somewhere
      in the LCD shader code path. It does not happen in the greyscale
      code path.

      * the "x,y" parameters in BaseShaderGraphics.drawString()
        are mapped to device space in the function, but the LCD code
        path then uses them as if they are in user space.
        This appears likely to be the cause of incorrectly placed
        text when there's a scaling transform

      * The usage of FontStrike.getStringBounds() in the shader code
         path appears to be part of the calculation as to what area
         of the destination to sample. Because these bounds
        are in the font's coordinate system (user space) it needs to
        account for the graphics transform. The calculation also
        mixes the device x,y (see above) with these user space values.
        Its not clear what role this has in the additional application of
        the transform to the glyphs.

            thor Thor Johannesson (Inactive)
            prr Philip Race
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: