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

Docs for TextAttribute has to be enhanced

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.2.1
    • client-libs
    • 2d
    • generic
    • generic

      TextAttribute.FONT is used in preference to any of the other font-specific attributes in the map, like SIZE, POSTURE, WIDTH etc. There is no merging of maps done. Thus, if we have TextAttribute.FONT specified, all other font-specific attributes will be ignored.

      It is possible to specify these attributes, using either Font.deriveFont(Map), or Font.getRequestedAttributes().put(key, value), to perform this kind of
      merging directly.

      Also in Font constructor which accepts a Map, only attributes returned by getAvailableAttributes is supported. All other attributes are ignored. This set of attributes is hardcoded and contains - FAMILY, WEIGHT, POSTURE, SIZE, TRANSFORM, SUPERSCRIPT and WIDTH.

            dougfelt Doug Felt
            rmenonsunw Rakesh Menon (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: