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

Ambigious specs for attributed text drawing

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 6
    • 2.0, 1.2.1, 5.0
    • client-libs
    • None
    • 2d
    • b33
    • generic, x86, sparc
    • generic, linux, solaris_8

      The spec for java.awt.font.TextAttribute specifically allows interpolation
      of values by Fonts. The questions are:

       - Can completely ignoring an attribute considered as such interpolation?

       - Can interpolation be performed on non-Font related attributes, such as
         UNDERLINE or FOREGROUND?

       - Are there any attributes that cannot be supported by Fonts? In other words,
         such attributes must always be ignored by Graphics.drawString(String..)
         and should be generally taken into account by Graphics.drawString(
         AttributedCharacterIterator..).
         Note that FOREGROUND might be one of them since Graphics.drawString(
         String..) requires to use the curent color. This might be a bug though
         - see 5102269.

      - If a Font instance was created with attributes that it doesn't support,
         can those attributes take effect under some circumstances? For example,
         Graphics.drawString(String..) is specified to use the current font.
         If the current font has UNDERLINE in getAttributes() but not in
         getAvailableAttributes(), will Graphics.drawString(String..) underline
         the text?

      ###@###.### 2004-09-14

            dougfelt Doug Felt
            savzan Stanislav Avzan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: