Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Beautiful (Anti-alias) Chinese Character Display

alt text
(source: google.com)

Recently, I realize the Chinese Character displayed are rather ugly in my application.

I thought I should make them to "anti-alias". But, how can I do that in Java?

FYI, I didn't explicitly choose the font I want to use in my GUI application. I solely let the system decide their own during startup. I however, do explicitly set the locale, before show up the GUI.

Locale.setDefault(locale);

The system will always choose

javax.swing.plaf.FontUIResource[family=Tahoma,name=Tahoma,style=plain,size=11]

no matter I am in English or Chinese locale.

like image 768
Cheok Yan Cheng Avatar asked Dec 04 '25 00:12

Cheok Yan Cheng


1 Answers

Anti-aliasing considered harmful: http://www.joelonsoftware.com/articles/fog0000000041.html

The point is, that beauty of characters is not necessarily the user interface goal. It is not everything. What you should look for, is readability of text. When your Chinese characters look not smooth, it may be exactly what helps human eye's control loop to know that it is in focus and stop blaming the eye muscules for blurriness. Really, don't fall in this pitfal.

like image 101
Pavel Radzivilovsky Avatar answered Dec 05 '25 12:12

Pavel Radzivilovsky



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!