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

java.awt.FontMetrics class is deserialized incorrectly.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • 1.1.7
    • client-libs
    • generic
    • solaris_2.6

      Viador Inc., one of Computer System's key ISVs is having a major issue with Unix Java font metrics that affecting their application. They use
      Unix Java font metrics to produce PDF output on the Unix server and if the application is viewed on a NT client platform (different from the server platform), the output appears completely wrong. This is affecting their worldwide application and their customers (Citibank, Amazon, and Paine Webber).

      This is similar to Bug ID 4082048, but there is no work around to fix
      this bug.

      They are running Solaris 2.6, NT 4.0, and JDK1.1.7B
      A simple small test case is included. Please run it on both Unix and NT to see
      the difference.

      import java.awt.*;

      public class test extends Frame
      {
        public test()
        {
          super();
        }

        public static final void main(String s_a[])
        {
          test t = new test();
          Font f = new Font("Dialog", Font.PLAIN, 12);
          t.setFont(f);
          FontMetrics fm = t.getFontMetrics(f);
          int w = fm.stringWidth("Hello World");
          int h = fm.getHeight();
          System.out.println("w = " + w + ", h = " + h);
        }
      }

            duke J. Duke
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: