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

Font Metrics information of 1.4 is different from that of 1.3

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: 1.4.1
    • Fix Version/s: None
    • Component/s: client-libs
    • Subcomponent:
      2d
    • CPU:
      x86
    • OS:
      windows_2000

      Description

      Some of font information (1.4.X) is different from that of 1.3.1_0X.
      The diff. is small, but on the frame or canvas which have a lot of
      components, such small diff. are piled up and finally, the looking
      becomes different.

      The attached program does not represent the seriousness which happens
      to the customer, but prints each value of Font attributes.

      1. Reproduce

        Compile the attached program and invoke "java MetricTest".

      ===>
      import java.awt.*;
      //import javax.swing.*;

      public class MetricsTest extends Canvas{

              public MetricsTest(int size, int style){
                      //super(title);
                      Font f = new Font("Dialog", style, size);
                    FontMetrics fm = getFontMetrics( f ) ;

                    System.out.println("Font Height : " + fm.getHeight() ) ;
                    System.out.println("Font Max Advance : " + fm.getMaxAdvance()) ;
                      System.out.println("Font Ascent : " + fm.getAscent());
                      System.out.println("Font Descent : " + fm.getDescent());
                      System.out.println("Font Leading : " + fm.getLeading());

              }

              public static void main(String args[]){
                      System.out.println("Test Start");
                      MetricsTest gtp = new MetricsTest(20, Font.PLAIN);
                      System.out.println("Test End") ;

              }
      }
      <===

      2. configration
        
        MPU : Pentium IV 1.4 [GHz]
        MEM : 384 [MB]
        OS : windows 2000 (SP2, japanese)
        Graphic Card : WinFast GeForce2 MX SH Pro
                      (driver: 3.11.0130 )

      3. Note

        The followings are the results.
        As for the leading and height are different between 1.4.X and 1.3.1_0X.

      =========================================================
      K:\sample3>java -version
      java version "1.3.1_04"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_04-b02)
      Java HotSpot(TM) Client VM (build 1.3.1_04-b02, mixed mode)

      K:\sample3>java MetricsTest

      Test Start
      Font Height : 27
      Font Max Advance : 40
      Font Ascent : 21
      Font Descent : 5
      Font Leading : 1
      Test End

      =======================================================

      K:\sample3>java -version
      java version "1.4.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
      Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)

      K:\sample3>java MetricsTest

      Test Start
      Font Height : 26
      Font Max Advance : 40
      Font Ascent : 21
      Font Descent : 5
      Font Leading : 0
      Test End

      ======================================================

      K:\sample3>java -version
      java version "1.4.1-rc"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-rc-b16)
      Java HotSpot(TM) Client VM (build 1.4.1-rc-b16, mixed mode)

      K:\sample3>java MetricsTest

      Test Start
      Font Height : 26
      Font Max Advance : 40
      Font Ascent : 21
      Font Descent : 5
      Font Leading : 0
      Test End

      ======================================================


      2002-07-08
      =============================================================================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                duke J. Duke (Inactive)
                Reporter:
                tbaba Tadayuki Baba (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: