Menu Font Garbled in Java Application

2019-02-28 21:17发布

问题:

I am trying to change the menu font in a Java application (OmegaT http://www.omegat.org). However, when I change the default menu font in Windows 7 64-bit (under "Advanced Appearance Settings...") the menus as well as file dialogs become garbled as this screen-shot shows: http://www.sbbic.org/omegat/1.jpg (even selecting Tahoma as the default font causes this problem).

Has anyone ever seen this garbling text before and know how to solve it, or have some suggestions on troubleshooting?

Is it a Java issue? OmegaT is supposedly just using the default fonts from Windows...

I have contacted the developers of OmegaT, but they are at a loss for what the issue is. I thought by posting my question here, others might have encountered the same error and know how to resolve it.

Thanks, Nathan

回答1:

Turning off Windows ClearType font settings worked me for. This took me hours to figure out. The app I was using that was causing me problems was ReportWorks for PowerSchool.



回答2:

I deleted FNTCACHE.DAT in my system32 directory and rebooted, and it seemed to fix it. Weird. http://windows7forums.com/windows-7-support/49179-windows-7-64-bit-fonts-not-shown-4.html so I guess it was a Windows issue and not Java at all.

Thanks.



回答3:

Do not Turn off ClearType, just tune it. By Andrey Rast (Source) search ClearType and tune it. After that Java error will disappear.

I already tried it for Arduino IDE and JetBrains IDE. It gave me the same error

Exception in thread "main" java.lang.ExceptionInInitializerError Caused by: java.lang.IllegalArgumentException: 33 incompatible with Text-specific LCD contrast key

And, check your Java versions for Env si JRE to be the same.



标签: java fonts menu