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

RFE: Bad implementation of constructor FontUIResource(Font font)

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 1.4.1
    • Fix Version/s: None
    • Component/s: client-libs

      Description

      Name: jk109818 Date: 01/23/2003


      FULL PRODUCT VERSION :
      build 1.4.1_01-b01

      A DESCRIPTION OF THE PROBLEM :
      the constructor FontUIResource(Font font), doesn't return
      a FontUIResource equivalent to the font used.

      The implementation of the constructor is
      public FontUIResource(Font font) {
        super(font.getName(), font.getStyle(), font.getSize());
      }

      but you lose lot of info like AffineTransform used in
      font object.

      a better implementation will be
      public FontUIResource(Font font) {
        super(font.getAttributes());
      }

      if this is not possible to modify this implementation, at
      least then add the constructor:

        Public FontUIResource(Map attributes)

      otherwise not every font could be used in the MetalTheme
      for example.


      REPRODUCIBILITY :
      This bug can be reproduced always.
      (Review ID: 180313)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                svioletsunw Scott Violet (Inactive)
                Reporter:
                jkimsunw Jeffrey Kim (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: