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

Need API to get/set TextAttribute on Graphics2D

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 1.2.1, 1.4.0
    • client-libs
    • None
    • 2d
    • generic
    • generic

      This RFE is intended to provide the Graphics2D class with a set of API to get/set text attributes defined in java.awt.font.TextAttribute. Currently, there is no way to specify those attributes when the application calls text drawing methods on Graphics2D, such as drawString method, even though it can handle complex text.

      The API would simply maps the functionality currently implemented in the Font class and the TextLayout class so that the application can expect the same result. In case that the application creates its own Font or TextLayout instance, and sets conflicting text attributes in Graphics2D, those attributes in Font or TextAttribute take precedence.

      This API is originally required to address the numeric shaping feature in Swing components (RFE 4337267) and the default text run direction problem (in drawString, bug 4701238).

      ###@###.### 2003-03-05

            dougfelt Doug Felt
            naoto Naoto Sato
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: