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

Incorrect font rendering under Windows LAF

    Details

    • Subcomponent:
      2d
    • CPU:
      x86_64
    • OS:
      windows_7

      Description

      ADDITIONAL SYSTEM INFORMATION :
      Microsoft Windows [Version 6.1.7601]

      java version "11" 2018-09-25
      Java(TM) SE Runtime Environment 18.9 (build 11+28)
      Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11+28, mixed mode)


      A DESCRIPTION OF THE PROBLEM :
      Font rendering for the default font under Windows LAF looks strange, e.g. in JLabel. At least lowercase i and l look incorrectly aligned horizontally - it looks almost like an extra space character is rendered.

      REGRESSION : Last worked in version 10.0.1

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Run the attached reproducer (FontBug) with sample labels.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Correctly rendered labels
      ACTUAL -
      Extra space in string rendering

      ---------- BEGIN SOURCE ----------
      import java.awt.EventQueue;
      import java.awt.FlowLayout;

      import javax.swing.JFrame;
      import javax.swing.JLabel;
      import javax.swing.UIManager;

      public class FontBug extends JFrame
      {
         public FontBug()
         {
            super( System.getProperty( "java.runtime.version" ) );

            setDefaultCloseOperation( EXIT_ON_CLOSE );
            setLayout( new FlowLayout() );

            add( new JLabel( "Admin" ) );
            add( new JLabel( "Client" ) );
            add( new JLabel( "Identity" ) );
            add( new JLabel( "Implemented" ) );
            add( new JLabel( "without" ) );

            pack();
            setVisible( true );
         }

         public static void main( String[] args )
         {
            EventQueue.invokeLater( new Runnable()
            {
               @Override
               public void run()
               {
                  try
                  {
                     UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() );
                  }
                  catch ( Exception e )
                  {
                     e.printStackTrace();
                  }

                  new FontBug();
               }
            } );
         }
      }

      ---------- END SOURCE ----------

      FREQUENCY : always


        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                pardesha Pardeep Sharma
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: