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

need access to Asian fonts with fixed 2-to-1 width ratios

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b01
    • CPU:
      generic, sparc
    • OS:
      generic, solaris_2.5.1, solaris_9
    • Verification:
      Not verified

      Backports

        Description


        > Java WorkShop includes a "point-and-click" text editor.
        > For Asian locales, this text editor (and apparently other
        > non-Java editors like "vi") expect there to be a fixed 2-to-1
        > ratio in the width of Latin and Asian characters. I don't
        > know much about writing a text editor, but I can see that
        > this fixed width ratio would be important for text alignment.
        > With the current JDKs (both 1.1.5 and 1.2beta2) we have not
        > been able to achieve this.
        >
        > For example, in the Japanese locale, the font.properties.ja
        > file specifies that the "monospaced" font first try to use
        > the "courier" font, followed by the "morisawa-gothic...jisx0208"
        > and "morisawa-gothic...jisx0201" fonts. Thus, the Latin
        > characters will be drawn with the "courier" font, the Kanji (sp?)
        > characters with the "morisawa-gothic...jisx0208" font, and
        > the 1/2-width Katakana characters with the "morisawa-gothic...jisx0201"
        > font. (I'm pretty clueless about i18n issues, so please pardon
        > whatever mistakes I'm making here.) For a given point size,
        > there is a 2-to-1 width ratio between the two "morisawa gothic"
        > fonts, but the "courier" font has an average width somewhere
        > around 1.5 (instead of 1.0).
        >
        > With the help of Naoyuki.Ishimura@Japan, we discovered how native
        > (non-Java) text editors solve this problem, and we put the same
        > solution into Java WorkShop. Since this seems like a fairly
        > general problem, and since we are trying very hard to get our
        > JDK in sync with JavaSoft's JDK, we would like you to consider
        > this solution (or any better solution that you can come up with)
        > as an RFE for JDK 1.2.
        >
        > If you look at the fontsets defined in
        > /usr/openwin/lib/locale/ja/OW_FONT_SETS/OpenWindows.fs,
        > you will see that they use only fonts from the same family,
        > e.g., -*-gothic-medium-..., without mixing in "courier" to
        > handle the Latin characters. Apparently, the first half of
        > the glyphs in the "-*-gothic...jisx0201" font are for Latin
        > characters, and the second half are for the 1/2-width Katakana
        > characters. You don't need the "courier" font to display the
        > Latin characters. We changed the "monospaced" font in
        > font.properties.ja to only use the "morisawa-gothic" fonts,
        > and this solved our problem. We also had to add some new
        > character set converters to handle a few special characters.
        > This same solution also applies to other Asian locales and
        > works with both Solaris and win32.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                sherman Xueming Shen
                Reporter:
                duke J. Duke (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: