Font Anti-Aliasing customization

For discussions about the source code and how to get involved in the development of muCommander.

Font Anti-Aliasing customization

Postby spiff » Tue Nov 22, 2011 6:35 am

Hi All!

I've successfully developed Font Anti-Aliasing customization feature in muCommander (from HEAD revision). I've found ticket (http://trac.mucommander.com/ticket/159) about it and decided to help muCommander community.

Also I've developed supporting of two languages for this feature - RU and EN.

Attached you will find my patch and full-size screenshot. I hope my code will be in muCommander trunk :-)

Thank you for muCommander!
Attachments
muc.png
scrot
muc.png (43.92 KiB) Viewed 1877 times
aa.patch
patch
(5.81 KiB) Downloaded 117 times
spiff
 
Posts: 6
Joined: Tue Nov 22, 2011 6:04 am
Location: Novosibirsk, Russia

Re: Font Anti-Aliasing customization

Postby arik » Wed Nov 23, 2011 9:50 pm

Hey,

Thank you for your contribution!

I'll check it on the weekend and then reply back.

Regards,
Arik
arik
 
Posts: 68
Joined: Sat Mar 01, 2008 10:48 am

Re: Font Anti-Aliasing customization

Postby spiff » Thu Nov 24, 2011 5:28 am

Thanks a lot!

But, please use my cleared version of patch (tabs was replaced by spaces, unused imports was deleted). See attached "cleared_aa.patch".
Attachments
cleared_aa.patch
new version of patch
(5.54 KiB) Downloaded 128 times
spiff
 
Posts: 6
Joined: Tue Nov 22, 2011 6:04 am
Location: Novosibirsk, Russia

Re: Font Anti-Aliasing customization

Postby arik » Sat Nov 26, 2011 11:45 pm

Hey,

Here's my feedback:
1. It seems that the system property "awt.useSystemAAFontSettings" was introduced at java 1.6 (See http://docs.oracle.com/javase/6/docs/te ... ml#aaFonts). muCommander still supports java 1.5 that refered to the system property "swing.aatext" instead - we should distinguish this case also.
2. I read at http://mindprod.com/jgloss/antialiasing.html that there are more values other than "lcd" such as "gasp". I think we should let the user choose between those options if we can't determine what is the best option for him.
3. I think a better way would be to add two more attributes for MuConfiguration (which was replaced yesterday by MuPreferences class by the way):
FONT_ANTIALIASING_ON = ...
FONT_ANTIALIASING_OFF = "off"
and then DEFAULT_FONT_ANTIALIASING will be changed to DEFAULT_FONT_ANTIALIASING = FONT_ANTIALIASING_ON and
String aa = isSelected() ? MuConfiguration.DEFAULT_FONT_ANTIALIASING : "off";
will be changed to
String aa = isSelected() ? MuConfiguration.DEFAULT_FONT_ANTIALIASING : MuConfiguration.FONT_ANTIALIASING_OFF;
4. Most of the properties under the preferences dialog are changed when choosing "apply" or "ok" options. that's not the case with the anti-aliasing checkbox - so we may want to add a "restart required to apply the change" next to it, or trying to refresh the mainframe with the updated configuration if it's possible.

Thanks again,

Regards,
Arik
arik
 
Posts: 68
Joined: Sat Mar 01, 2008 10:48 am


Return to Developer's corner

Who is online

Users browsing this forum: No registered users and 0 guests

cron