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

Sol 2.5 char J extends past the baseline in Clipping.Text demo

XMLWordPrintable

    • 2d
    • sparc
    • solaris_2.5.1

      Build : Java2DFCS:13-Oct-98 & "N"
      app : Java2D demo, demos.Clipping.Text
      OS : Solaris 5.5.1
      attachment: yes (snapshot of Java2Demo Clipping.Text)

      This particular app is an exemplary example of either a font or font metrics problem where the "J" falls unexpectedly way below the baseline.



      On Solaris 2.5.1 :

      java full version "JDK-1.2fcs-N"
      cd /usr/local/java/jdk1.2/solaris/demo/jfc/Java2D
      ../../../bin/java demos.Clipping.Text


      The font for the text is Helvetica. The piece of text is scaled...

              Font f = new Font("Helvetica",Font.BOLD,32);
              String s = new String("JAVA");
              TextLayout tl = new TextLayout(s, f, frc);
              double sw = tl.getBounds().getWidth();
              double sh = tl.getBounds().getHeight();
              double sx = (w-40)/sw;
              double sy = (h-40)/sh;
              AffineTransform Tx = AffineTransform.getScaleInstance(sx, sy);
              Shape shape = tl.getOutline(Tx);


      brian.lichtenwalter@Eng 1998-10-15

            pkejriwasunw Parry Kejriwal (Inactive)
            rckim Robert Kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: