Skip to content

Add subpixel positioning of glyphs to image backend

Nikolaus Waxweiler requested to merge madig/cairo:subpixel-positioning into master

This commit enables subpixel positioning with a 4x4 subpixel grid. Currently, only the image compositor is supported.

When compositing glyphs in the image compositor, we store the subpixel phases in the high bits (24-28) 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.

This produces some test suite failures I'd have to sort out, e.g. text-rotate seems to be broken.

Merge request reports