image compositor: Support subpixel positioning

Graphics / Cairo - Matthias Clasen [redhat.com] - 18 July 2019 21:38 EDT

Support subpixel positioning with a 4x4 subpixel grid.

When compositing glyphs in the image compositor, we store the subpixel phases in the high bits of the glyph index. The _cairo_scaled_glyph_index() macro has been updated to discard these bits. By storing the phases in the glyph index, the glyph cache just keeps working. When loading a glyph, the Freetype font backend shifts the outline according to the phases.

ea9329215 image compositor: Support subpixel positioning
src/cairo-ft-font.c | 10 ++++++++++
src/cairo-image-compositor.c | 13 +++++++++++--
src/cairoint.h | 5 ++++-
3 files changed, 25 insertions(+), 3 deletions(-)

Upstream: cgit.freedesktop.org


  • Share