Closed mrandri19 closed 5 years ago
Let's use FT_LCD_FILTER_DEFAULT
.
Also yikes, that's a big oversight! Thanks for catching it.
FTR, if the current FreeType is compiled without support for LCD filters (and thus FT_Library_SetLcdFilter
always fails), it will produce output almost identical to FT_LCD_FILTER_LIGHT
.
Maybe that's why this was overlooked.
Currently, when rendering a glyph on Linux using the FreeType renderer and
RasterizationOptions::SubpixelAa
there is no LCD filtering.It looks like this, with very noticeable color fringing:
To enable filtering with FreeType
FT_Library_SetLcdFilter
should be set, but I don't know how that would work on other platforms.The easiest solution would be to keep it transparent to the user and always use
FT_LCD_FILTER_DEFAULT
with FreeType. I could try to make a pull request for that if this solution works for you.