[antlr-interest] AW on Windows 7

Dean Pavlekovic dpavlekovic at gmail.com
Thu Apr 7 06:23:25 PDT 2011


Hi,

I'm new to the list so first let me give a hello and big compliments
for ANTLR & Works. I started using ANTLRworks a month or so ago,
trying to learn a bit about parsing/translation/small interpreter
construction in my spare time. Also extra compliments for the Language
Implementation Patterns, I definitely wish I had it *before* I started
fiddling with my first grammar!

About the fonts on Win7... text seems to be rendered correctly
everywhere except for the main editor widget: it always renders
aliased/non-smoothed font. New MS fonts like Consolas look quite bad
at small sizes without smoothing so after I couldn't find any way to
configure it in UI I went on to try to fix it.

The attached patch fixes the issue for me on Win7, it should set the
system default antialiasing option for editor pane too. But please
take it with reserve since I have almost no experience with Java: I'm
not sure how this would affect other OSes, I just poked around a bit
following what I found on Google:

http://stackoverflow.com/questions/2266199/how-to-make-jtextpane-paint-anti-aliased-font
http://download.oracle.com/javase/6/docs/technotes/guides/2d/flags.html#aaFonts
   -> see:awt.useSystemAAFontSettings

Cheers,
Dean

On Wed, Apr 6, 2011 at 7:31 PM, Terence Parr <parrt at cs.usfca.edu> wrote:
>
> Yo, does Windows 7 show on aliased bitmaps fonts? If so, how do you get around it to show nice new aliased fonts? I could swear that there was a checkbox for this in AW preferences, but I don't see it.
> Ter
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
-------------- next part --------------
A non-text attachment was scrubbed...
Name: antialias.diff
Type: application/octet-stream
Size: 1339 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20110407/7b4d0af3/attachment.obj 


More information about the antlr-interest mailing list