You can get W2K/XP to anti-alias with Start ⇒ Control Panel ⇒ Display ⇒ Effects ⇒ Smooth edges of screenfonts. You can get Vista to anti-alias with Start ⇒ Control Panel ⇒ System and Maintenance ⇒ Performance Information and Tools ⇒ Adjust Visual Effects (on left) ⇒ smooth edges of screen fonts.
. You can get Vista to anti-alias with Start ⇒ Control Panel ⇒ System and Maintenance ⇒ Performance Information and Tools ⇒ Adjust Visual Effects (on left) ⇒ smooth edges of screen fonts.
With an LCD (Liquid Crystal Display) monitor, you want subpixel anti-aliasing called ClearType. To turn it on click Start ⇒ Control Panel ⇒ Appearance and Personalization ⇒ Personalization ⇒ Windows color and appearance ⇒ Open classic colour and appearance ⇒ Effects ⇒ ClearType.
Without anti-aliasing, you will see jagged diagonal lines especially in the large sizes of spidery fonts with thin diagonal lines (e. g. Bodoni, Book Antiqua, Garamond, Serif and Zapf Calligraphic) especially on the capital W. Sun, even when anti-aliasing, pays no attention to the font rendering hints. This why small font sizes are so grungy looking. Anti-aliasing is primarily to make large font sizes look better.
|Appearance||In Java 1.6|
|In Java 1.2||Anti-aliasing Gotchas|
|In Java 1.3||Links|
|In Java 1.4|
Several influences combine to decide whether you will get anti-aliasing:
To anti-alias fonts in AWT (Advanced Windowing Toolkit), you have to go through a gambit like this in your CanvasThere is another technique that uses an undocumented Sun class.
It won’t do you any good to override the paint method of a peered Component such as Label, TextField or TextArea since the rendering is handled by the peer. Whether they are anti-aliased is determined by the OS (Operating System) Control Panel.
Smooth Metal LAF (Look And Feel) adds anti-aliasing to various Sun LAFs (Look And Feels).
WrapLF is a LAF that lets you insert your own code.
I reported this to Sun and they explained the anomaly is a feature.
Internally when Swing sees a Thai or Arabic character, it switches to using a TextLayout for rendering. A TextLayout is created with a FontRenderContext, and the anti-aliasing Component of that FontRenderContext is applied when rendering too. In other words the usual anti-alias gambit does not work because it is anti-aliasing the wrong Component when you have Thai or Arabic characters.
available on the web at:
optional Replicator mirror
Please email your feedback for publication, letters to the editor, errors, omissions, typos, formatting errors, ambiguities, unclear wording, broken/redirected link reports, suggestions to improve this page or comments to Roedy Green : . If you want your message, your name or email kept confidential, not considered for public posting, please explicitly specify that. Unless you state otherwise, I will treat your message as a letter to the editor that I may or may not publish in the feedback section. After that, it will be too late to retract it. If you disagree with something I said, especially when sending an ad-hominem attack, a rant composed mainly of obscenities or a death threat, please quote the offending passage and cite the web page where you found it, tell me why you think it is wrong, and, if possible, provide some supporting evidence. I can’t very well fix erroneous or ambiguous text if I can’t find it.
Your face IP:[126.96.36.199]
|Feedback||You are visitor number 50,580.|