The comment indicates the enabling this flag activates sub-pixel
rendering, yet it later says that with this option on R=G=B.
Ah, bad wording. It means exactly the opposite. In git, I've just
changed it to the following:
[...]
This macro has no impact on the FreeType API, only on its
_implementation_. For example, using FT_RENDER_MODE_LCD when
calling FT_Render_Glyph still generates a bitmap that is 3 times
wider than the original size in case this macro isn't defined;
however, each triplet of subpixels has R=G=B.
Werner
Thanks for the clarification.
So if I do the below:
- enable FT_CONFIG_OPTION_SUBPIXEL_RENDERING in ftoption.h
- call FT_Library_SetLcdFilter with FT_LCD_FILTER_DEFAULT
- use FT_RENDER_MODE_LCD when calling FT_Render_Glyph
Then, the result of FT_Render_Glyph will be a 24-bit (8 bits for each
red,green,blue) color image. Rendering this as a 24-bit color image
will take advantage of subpixel rendering and since I called
FT_Library_SetLcdFilter it will already have been filtered to reduce
color fringes.
Is the above correct? Or is there some additional filtering I am
supposed to do other than whats provided by FT_Library_SetLcdFilter?
Also, this results in a color image so I need to figure out how to best
render that in GL, but thats a GL thing not a FreeType thing.
_______________________________________________
Freetype mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/freetype