This implements oversampling to metigate artifacts in pixels partially covered by overlapping contours. It turns out that the 4x4 oversampling is sufficient but, at least, quadruples the rendering time. The outline has to set FT_OUTLINE_OVERLAP to use this method.
- include/freetype/ftimage.h (FT_OUTLINE_OVERLAP): New flag.
- src/smooth/ftsmooth.c (ft_smooth_render): Check it to... (ft_smooth_raster_overlap): ... inflate outline and set up direct rendering for oversampling with... (ft_smooth_overlap_spans): ... new span function that integrates them.
3bb512bc9 [smooth] Introduce direct oversampling for overlaps.
ChangeLog | 15 +++++++
include/freetype/ftimage.h | 8 ++++
src/smooth/ftsmooth.c | 104 ++++++++++++++++++++++++++++++++++++++++++---
3 files changed, 121 insertions(+), 6 deletions(-)