looks
  1. looks
  2. LOOKS-148

Plastic font selection is incorrect on English Windows XP with Japanese locale selected

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.1.2
    • Fix Version/s: 2.6.0
    • Component/s: common
    • Labels:
      None
    • Environment:

      Operating System: Windows XP
      Platform: All

    • Issuezilla Id:
      148

      Description

      A common configuration in Asia is to use a standard UK/US Windows XP
      installation, install Japanese support, and then make Japanese the default locale.

      JGoodies looks seems to select the wrong fonts in this case. The locale is
      clearly ja_JP, but the 'Tahoma' font is selected (which of course does not
      support Japanese characters). Interestingly, the JGoodies FontTest application
      itself displays Japanese text correctly (using "MS PGothic"), but the default
      Plastic font policy selects Tahoma even though it knows that it won't work:
      defaultGUI font can display localized text=no
      icon font can display localized text=no

      Perhaps if the defaultGUI and icon font can't display the localized text the
      font policy should fall back on the JVM L&F defaults?

      Full FontTest output is included below:
      =======================================

      Java environment:
      java.vendor=Sun Microsystems Inc.
      java.version=1.5.0_07
      java.runtime.version=1.5.0_07-b03
      java.vm.version=1.5.0_07-b03
      sun.desktop=windows

      Operating System:
      os.name=Windows XP
      os.version=5.1

      Windows Settings:
      Modern Windows=true
      Windows XP=true
      Windows Vista=false
      Windows L&f XP Mode=false

      AWT Properties:
      awt.toolkit=sun.awt.windows.WToolkit
      screen.size=1024 x 768
      screen.resolution=120 (high)

      User Settings:
      user.language=ja
      user.country=JP
      user.timezone=

      Desktop Properties:
      win.defaultGUI.font=Tahoma-plain-13
      win.icon.font=Tahoma-plain-14
      win.menu.font=Tahoma-plain-14
      win.messagebox.font=Tahoma-plain-14
      win.ansiVar.font=MS Sans Serif-plain-13 family=SansSerif
      win.ansiFixed.font=Courier-plain-16 family=Dialog
      win.frame.captionFont=Tahoma-bold-13
      win.tooltip.font=Tahoma-plain-14

      Internationalization:
      defaultLocale.getDisplayName(Locale.ENGLISH)=Japanese (Japan)
      defaultLocale.getDisplayLanguage(Locale.ENGLISH)=Japanese
      defaultLocale.getDisplayLanguage(defaultLocale)=日本語
      locale has localized display language=true
      defaultGUI font can display localized text=no
      icon font can display localized text=no

      JGoodies Windows L&f:
      controlFont=Tahoma-plain-13
      menuFont=Tahoma-plain-14
      titleFont=Tahoma-plain-13
      messageFont=Tahoma-plain-14
      smallFont=Tahoma-plain-14
      windowTitleFont=Tahoma-bold-13

      JGoodies Plastic L&fs:
      controlFont=Tahoma-plain-13
      menuFont=Tahoma-plain-13
      titleFont=Tahoma-bold-13
      messageFont=Tahoma-plain-13
      smallFont=Tahoma-plain-11
      windowTitleFont=Tahoma-bold-13

        Activity

        Hide
        karsten added a comment -

        If neither the defaultGUI font nor the icon font can display the localized text,
        the Looks shall fall back to the fonts used by the core L&f we inherit from.

        I had planned this for the Looks 2.1.x, but it takes a bit more time to model
        the FontChoicePolicy that says "I don't want to change anything." I may
        introduce a special FontChoicePolicy instance that is used as a marker for just
        this purpose.

        The change shall be in the Looks 2.2, or Looks 3.0, whatever comes first.

        Show
        karsten added a comment - If neither the defaultGUI font nor the icon font can display the localized text, the Looks shall fall back to the fonts used by the core L&f we inherit from. I had planned this for the Looks 2.1.x, but it takes a bit more time to model the FontChoicePolicy that says "I don't want to change anything." I may introduce a special FontChoicePolicy instance that is used as a marker for just this purpose. The change shall be in the Looks 2.2, or Looks 3.0, whatever comes first.
        Hide
        golovnin added a comment -

        I have added a font policy to the issue LOOKS-182, which may fix this issue too.

        Show
        golovnin added a comment - I have added a font policy to the issue LOOKS-182 , which may fix this issue too.
        Hide
        karsten added a comment -

        The overhauled font policies should now fix the display of non-western fonts. The new FontPolicies#getDefaultPlasticOnWindowsPolicy inherits from the default Windows font policy. Both will use composite fonts - if these can be created using Oracle's internal classes.

        Show
        karsten added a comment - The overhauled font policies should now fix the display of non-western fonts. The new FontPolicies#getDefaultPlasticOnWindowsPolicy inherits from the default Windows font policy. Both will use composite fonts - if these can be created using Oracle's internal classes.

          People

          • Assignee:
            karsten
            Reporter:
            benspiller
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: