You have to define FT_CONFIG_OPTION_SUBPIXEL_RENDERING so that you can
select one of the three available colour filters with
FT_Library_SetLcdFilter. There is no callback hook to add a new,
external colour filter function.
To get acquainted with subpixel rendering, please read
http://www.grc.com/cleartype.htm
which gives an excellent introduction to the topic.
Werner
Based on that article it seems the sub-pixel rendering is most effective
when dealing with white text on a black background or visa versa. Any
thoughts on the recommended approach for dealing with colored text? I
know FreeType isn't designed to render, say, a blue glyph, so this is
beyond the scope of what FreeType is doing.
But suppose you do use the sub-pixel rendering and end up with a nice
color rendered glyph using this technique. However, now you want the
text to appear blue to the user. It seems like shifting the color
toward blue would mess up the sub-pixel rendering. Do you just have to
abandon sub-pixel rendering in this case? I guess I'll have to do some
tests and see how GDI acts in this case.
Also I would guess its dependent on the background color as well right?
White text on black background would work great, but even white text on
a blue background would likely disturb the sub-pixel rendering technique
I would think.
In our case, we don't have a clear-cut foreground/background color since
we're rendering on top of a 3D OpenGL scene, so you never know nor can
you control what color will be behind the text. The text could be
displayed over a blue 3D model, or over the black background and this
could change as you rotate the view through the scene.
Anyway, just curious as to your thoughts on arbitrary colors in light of
the sub-pixel rendering.
_______________________________________________
Freetype mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/freetype