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

stringWidth wrong for Chinese font mapping

XMLWordPrintable

    • 2d
    • 1.2.1
    • x86
    • windows_nt



      Name: krT82822 Date: 05/17/99


      With both Traditional and Simplified Chinese font mappings
      (font.properties.zh_TW and font.properties.zh) and for strings
      that map to multiple fonts, graphics.stringWidth(String) does
      not return the correct width. We find this problem in a subclass
      of JToolTip where the text shifts from CHINESEBIG5_CHARSET to
      ANSI_CHARSET at the trailing end of the line. You might be able
      to reproduce the problem use the following text on a Chinese
      system in a tool tip:

      \u82e5\u8981\u900f\u904e\u7db2\u8def\u5b58\u53d6\u8cc7\u6599\u5eab\uff0c\u8acb\u628a\u7db2\u8def\u4f4d\u5740\u4f5c\u70ba JDBC URL \u4e4b\u4e00\u90e8\u5206\uff1a
      jdbc:subprotocol://hostname:port/subname

      This is on java version "1.1.7" (java full version "JDK 1.1.7
      IBM build n117p-19990128 (JIT enabled: ibmjitc)",
      but with the JIT turned off).
      (Review ID: 83163)
      ======================================================================

            ssisunw Ssi Ssi (Inactive)
            kryansunw Kevin Ryan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: