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

Monospaced font mapped to proportional font (David) for Hebrew

XMLWordPrintable

    • b138
    • generic
    • windows
    • Verified

      SYNOPSIS
      --------
      Monospaced font mapped to proportional font (David) for Hebrew

      OPERATING SYSTEM
      ----------------
      Windows

      FULL JDK VERSION
      ----------------
      All Java 6

      DESCRIPTION from LICENSEE
      -------------------------
      Characters of Hebrew for all fonts are mapped to the "David" font into fontconfig.properties file. This is even the case for the monospaced font (which is mapped to "Courier New" for English). This causes several functionality problems because "David" font is proportional, not monospaced.
       
      STEPS TO REPRODUCE
      ------------------
      1. Change system locale to Hebrew
      2. Run the provided testcase: java HebrewTest
      3. Type characters into the TextField - note that they are not
         monospaced.

      TESTCASE SOURCE
      ---------------
      import java.util.*;
      import java.awt.*;
      import javax.swing.*;

      public class HebrewTest extends JFrame {
          public HebrewTest() {
              super("Hebrew Monospace Font Test");
              JTextField JTextField1 = new javax.swing.JTextField();
              JTextField1.setFont(new Font("MonoSpaced", Font.PLAIN, 12));
              getContentPane().add(JTextField1);
          }

          public static void main(String args[]) {
              HebrewTest test = new HebrewTest();
              test.setDefaultCloseOperation(EXIT_ON_CLOSE);
              test.setSize(450, 150);
              test.setVisible(true);
          }
      }

      WORKAROUND
      ----------
      Fix the fontconfig.properties file manually as below:

        monospaced.plain.alphabetic=Courier New
        monospaced.plain.chinese-ms950-extb=MingLiU-ExtB
        monospaced.plain.hebrew=Courier New
        monospaced.plain.japanese=MS Gothic
        monospaced.plain.korean=GulimChe

        monospaced.bold.alphabetic=Courier New Bold
        monospaced.bold.chinese-ms950=PMingLiU
        monospaced.bold.chinese-ms950-extb=PMingLiU-ExtB
        monospaced.bold.hebrew=Courier New Bold
        monospaced.bold.japanese=MS Gothic


      JUSTIFICATION
      -------------
      We believe this represents a serious problem when hundreds of workstations need to be updated and request that the issue be fixed in the JDK.

            peytoia Yuka Kamiya (Inactive)
            dkorbel David Korbel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: