Issue Details (XML | Word | Printable)

Key: LOOKS-148
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: karsten
Reporter: benspiller
Votes: 1
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
looks

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

Created: 19/Sep/06 03:16 AM   Updated: 28/Feb/14 02:19 PM   Resolved: 28/Feb/14 02:19 PM
Component/s: common
Affects Version/s: 2.1.2
Fix Version/s: 2.6.0

Time Tracking:
Not Specified

Environment:

Operating System: Windows XP
Platform: All


Issuezilla Id: 148
Tags:
Participants: benspiller, golovnin and karsten


 Description  « Hide

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



karsten added a comment - 01/Feb/07 12:59 PM

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.


golovnin added a comment - 09/Mar/11 12:48 AM

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


karsten added a comment - 28/Feb/14 02:19 PM

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.