Posts: 56
Joined: Jul 2007
Reputation:
0
I saw the following in the to-do list:
[MINOR - HIGH PRIORITY] Support anti-aliased text rendering via FreeType (FreeType2 to be precise)
I'm thinking that this might be something I could try. What's the current status of this? I see that the freetype2 libs are already in SVN.
Thanks.
Posts: 26,215
Joined: Oct 2003
Reputation:
187
It's already in.
My guess is that whoever wrote that is wanting improved AA using freetype.
Some ideas would be:
Start by expanding the texture we store the cached letters at so that we get subpixel AA in the horizontal direction. The tricky bit with this is getting it to render correctly (probably a vertex shader/pixel shader combo in GL would do the trick). Effectively you store the image at 3 times the width, and render down to 1/3rd of a pixel accuracy. The tricky bit is assigning the correct value to each of the R,G,B components, based on where the letter is rendered (i.e. whether it's at a whole pixel location, or at 1/3 or at 2/3rds). A poor man's method is setting a different pixel shader per letter, but I'm sure it can be done much smarter using a vertex shader that rotates the textures as required.
Once that is done it could be further refined by increasing the size of the texture in the vertical direction as well, and/or increasing again in the horizontal (for 1/6th of a pixel resolution etc.)
Cheers,
Jonathan
Posts: 56
Joined: Jul 2007
Reputation:
0
Hummm, is it possible to put the porting tasks in the sourceforge tracker so that it's clear what items have been completed and what tasks are available for others to attempt?
I know that the devs are aware of the state of things, but folks that are trying to get involved may not know what things to tackle. This way the tasks could also say if 3d / OpenGL knowledge is needed or not. I say this 'cause I don't know 3d programming, but I have a lot of programming experience.
Just a suggestion.
Regards,
-Ed