Fixing font smoothing on OSX

While I was experimenting with themes in GNU Emacs for OSX, the font smoothing somehow got messed up for the entire OS. A quick Google search didn’t exactly yield a helpful answer, as they just directed me to the System Preferences, in the “General” section, and told me to make sure that the “LCD font smoothing” box was checked. This didn’t help me because it was already checked, and toggling it didn’t actually make a difference.

What actually ended up fixing it for me was to set font smoothing at the command line. Open up a terminal, and type the following to see if the value is currently set:

defaults -currentHost read -globalDomain AppleFontSmoothing

This command will show the current value, or alert you if there is no value currently set. If you want to delete the value (thereby restoring the default), do the following:

defaults -currentHost delete -globalDomain AppleFontSmoothing

You can set the value with the following command, replacing with level of smoothing:

defaults -currentHost write -globalDomain AppleFontSmoothing -int <value>

0 – No smoothing
1 – Light smoothing
2 – Medium smoothing
3 – Strong smoothing

OpenGL on OSX with GLUT and G++

There’s no doubt that programming with an IDE saves you loads of time with convenience, and ease-of-use. As programmers, we don’t always have the luxury of having a program do all the nasty bits for us, so it’s always good to learn how to program in a text editor (Emacs is a great choice) and how to compile from the command line.

Personally, I like programming in an environment that doesn’t require a lot of overhead, gives me a large amount of control, and lets me see all the little details. I’m going to give a startup tutorial for programming OpenGL with GLUT on OSX (Version 10.5.7), and I’ll be using nothing but GNU Emacs, and g++ (which is an optional install on your OSX Install DVD). More after the jump.

Continue reading