Created attachment 113342 [details]
In _cairo_composite_rectangles_init_for_glyphs extents->bounded
is intersected with the output of
which probably is considered a cheap approximation in excess of
the ink extents. Unfortunately there are fonts for which the
approximation is in defect.
This means that the cheap intersection test can incorrectly fail
and even when there is intersection the output is incorrectly
A workaround for the incorrect clip is to swap the arguments
in the call to _cairo_rectangle_intersect so that when there
is intersection extents->bounded is left unmodified and
extents->mask is anyway recomputed correctly in the following
call to _cairo_scaled_font_glyph_device_extents.
This workaround introduces another failure in the test-suite, but
considering test/reference/user-font-mask.ref.png you can see that
the first rows of the ink extent (green) rectangle are white, not
inked at all and the dot of the i is not symmetric, with the
workaround above the dot is symmetric and the ink extents is
corresponding to the 'inked' area.
The attached test case uses the font Mademoiselle Camille
I agree. I wasn't aware of this approximation code. Will take a look.
I don't have time to work on this. Do any of the current developer have time to take a look? Thanks in advance!
-- GitLab Migration Automatic Message --
This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/cairo/cairo/issues/139.