We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Pages: 1 2 
Editor font smoothing? (Read 8089 times)
Editor font smoothing?
Sep 6th, 2005, 12:33pm
 
I just started looking at Processing on Windows and the program seems to be fantastic!

One thing I noticed though, that always makes Java apps stand out on Windows, is the fact that fonts look crappy because they don't use the standard system settings for font anti-aliasing. I looked around a bit and it seems like Java does have the functionality these days to render smooth fonts (like the Tools/Create font option actually does nicely), so why isn't this used in the UI? Any chance this may be change? Honestly, it would make working with the UI just so much more fun!

Thanks
Oliver
Re: Editor font smoothing?
Reply #1 - Sep 6th, 2005, 4:03pm
 
To be honest, I've never actually seen a programming IDE that smooths monospace/fixed width fonts.

And personally I like un-smoothed fonts, because the smoothing can make them more fuzzy and harder to read at the relatively small font-sizes I tend to use when coding.
Re: Editor font smoothing?
Reply #2 - Sep 6th, 2005, 4:34pm
 
In Windows, font smoothing is an OS option, so of course every programmer's IDE will use the option when it's set. Java apps never seem to do that - I haven't been doing any Java coding in a long while, so I don't know if it's not possible, if the OS setting is just not honored by default or whatever else the problem is.

I don't want to start a discussion about whether or not font smooting is a good idea - I'm firmly of the opinion that everybody should decide things like that for himself. But I'm just as firmly of the opinion that programs should honor the system settings a user makes instead of imposing on the user the programmer's idea of how a GUI should look. I'm aware that I may be barking up the wrong tree - if this is a general problem of Java, just say so.
Re: Editor font smoothing?
Reply #3 - Sep 7th, 2005, 6:36am
 
to my knowledge, java doesn't consistently follow this as an os property, partly because it's not a standard cross-platform sort of thing: the mac deals with anti-aliasing differently than windows where you have a checkbox for "smooth".

if there were a way to read it as an os property, that might be a better way to go. but for now, i too have never seen an ide that smooths text of code so i'd prefer to avoid adding code that either makes it an option or tries to figure out some sort of os setting for each platform.
Re: Editor font smoothing?
Reply #4 - Sep 7th, 2005, 11:15am
 
I really wonder what IDEs you people are working with... I haven't seen any IDE that can't do it in the past five years, I'd say. VisualStudio does it, as did Borland Delphi. Emacs could do it on my Linux system when configured correctly.

Well, no matter. I do happen to think that this is one thing that'll always make Java apps stand out in a way from native apps, probably not only on Windows systems, but it doesn't make any sense to take this discussion any further - it's not really your problem anyway, but rather a general Java thing. I thought there might have been some option that I could have used, but... bad luck. Thanks for the feedback!
Re: Editor font smoothing?
Reply #5 - Dec 20th, 2005, 5:32pm
 
How do you configure emacs under Linux to display smoothed fonts?  I've been working on it for a while and can't find the configure options.

Thanks,
Dave
Re: Editor font smoothing?
Reply #6 - Oct 18th, 2008, 5:10am
 
To enable antialiasing in the Processing environment for all controls, including menus and the editor area, you need to pass a setting into the JVM. In Windows, this can be achieved by doing the following.

1. Create a file in your Processing directory called "processing.l4j.ini".
2. Inside this file, put this line, without quotes: "-Dswing.aatext=true".
3. Run Processing - the text should all be nicely antialiased now.

Unfortunately this doesn't use subpixel hinting, but it's a lot better than nothing. If you're using another system, you just need to pass the "-Dswing.aatext=true" option into the JVM when you're starting Processing.

Hopefully this will flow through to the official builds, and become a configurable option.
Re: Editor font smoothing?
Reply #7 - Dec 6th, 2008, 1:56am
 
I confirm that this setting also works under Mac OS 10.5; you must edit the Info.plist file found in the  Processing application bundle:

Quit Processing
In the Finder, navigate to where Processing is installed
Select Processing, Right-click, select "Show Package Contents"
Double-Click on the Info.plist file in the new Finder window
Reveal the VMOptions setting, (Root > Java)
Append -Dswing.aatext=true
Save
Restart Processing, confirm that PDE shows anti-aliased text in the editor (my current setting uses 12pt Andale Mono (editor.font="Andale Mono",plain,12 in preferences.txt)
Re: Editor font smoothing?
Reply #8 - Mar 5th, 2009, 8:10pm
 
I haven't had any success in getting antialiased text in the editor in my linux-based installation (ubuntu 8.04). I tried adding the suggested -Dswing.aatext=true to the processing startup script so that it reads

java processing.app.Base -Dswing.aatext=true

I could notice no change in the visual aspect. It is also unclear what font names are allowed as the editor font. I tried using "Andale Mono" and "Bitstream Vera Sans Mono" without any effect, although plain "Monospaced" does work. Any linux users out there have tried this?
Re: Editor font smoothing?
Reply #9 - Mar 5th, 2009, 10:25pm
 
Have you tried putting the font name in double quotes as ajstarks shows?
Also on SciTE editor, one have to write "!Andale Mono" to use Pango fonts. Might be interesting to try that.
Re: Editor font smoothing?
Reply #10 - Mar 6th, 2009, 1:00am
 
Nope, double quotes in font names do not help.
Re: Editor font smoothing?
Reply #11 - Jun 3rd, 2009, 8:54am
 
As of Processing 1.0.4, on Mac OS 10.5, the -Dswing.aatext=true hack does not seem to work.  Any changes in this version that would explain this?
Re: Editor font smoothing?
Reply #12 - Jun 3rd, 2009, 9:46am
 
I note that 1.0.3 uses a single property in the Info.plist file VMOptions:

-Xms128M -Xmx256M

whereas 1.0.4 uses two properties
item1: (-Xms128M)
item2 (-Xmx256M),
and simply appending -Dswing.aatext=true results in:

Warning: Incorrect memory size qualifier: M -Dswing.aatext=true Treating it as M

in the console, and the Anti-alias setting has not effect


Re: Editor font smoothing?
Reply #13 - Jun 3rd, 2009, 3:43pm
 
The property -Dswing.aatext=true does not work for me

Processing 1.0.4-Expert
Java 1.6.0_14
Windows XP SP3 using ClearCase

The new property awt.useSystemAAFontSettings doesn't work either
Re: Editor font smoothing?
Reply #14 - Jun 7th, 2009, 7:40pm
 
Note that as of Processing 1.0.5 smooth text is officially supported via the editor.antialias setting in the preferences file.

Thanks for the fix!
Pages: 1 2