OK so this is something that has been KILLING me with openFrameworks for a long time, and I almost tried to see if I could compile a different font handling library because of it.
Fonts don’t look right with ofTrueTypeFont. I mock things up in photoshop and the font sizes are just way off when I put them into OF. Also any smaller type (body type) just looks terrible, its really off, sort of like when you have a font in photoshop that isn’t on whole pixels.
I did some searching a month or two on the forums, really just seeing if there was any hope, and I came across this discussion between Moka and Arturo in the linux forum:
http://forum.openframeworks.cc/t/aliasedpixelfonts-ubuntu/2515/2
Basically the default font resolution for freetype is 96dpi. Why, I have no clue, but this explains everything. Screens/OSs use 72dpi for fonts, and fonts are designed for 72dpi. The change is super simple,
change
FT_Set_Char_Size( face, fontsize << 6, fontsize << 6, 96, 96);
to
FT_Set_Char_Size( face, fontsize << 6, fontsize << 6, 72, 72);
and everything looks super crisp and perfect.
This is a really frustrating problem but it has a super simple fix, its the first thing I do every time I download a new release of OF. Putting this change into future releases makes a lot of sense I think. If there is a reason for 96dpi, I think 72dpi should be default and there should be a simple method for changing it (setResolution(int resolution) or something like that).
Hope that makes sense
-Steve