When an edge fell to the left of the rendering surface (col < 0),
cell_add() discarded its winding contribution entirely. For glyphs
whose outlines extend beyond the surface bounds (e.g. COLR v1
spliceMask clip glyphs), this caused the interior winding number to
stay zero, producing empty rasterizations.
Fix by forwarding the cover delta to column 0 so the left-to-right
sweep picks up the correct accumulated winding.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove hb_raster_extents_from_glyph_extents and switch callers to the new transform-aware set_glyph_extents APIs on raster draw/paint. Also add test coverage for transformed glyph extents and update section symbol listings.
Pre-compute seam rows during edge bucketing where one edge's yH matches
another edge's yL at a mid-pixel-row y-coordinate. For these rare rows
(typically 2 per glyph), split into two sub-rows and sum absolute alpha
values to avoid winding cancellation. Non-seam rows take the exact same
code path with only a single branch check overhead.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When two contours share a y coordinate that falls mid-pixel-row,
their edges contribute opposite-winding cover values at different
fractional heights. The analytic formula |cover·512 − area|
computes the signed sum, which partially cancels, producing a
visible one-row artifact.
Fix by detecting these seam rows (an edge yH matching another
edge's yL within the same pixel row) and splitting into sub-rows.
Each sub-row's |cover·512 − area| is computed independently, then
the absolute alpha values are summed. This gives correct coverage
because each sub-row has consistent winding direction.
Performance impact is negligible: seam detection piggybacks on the
existing edge-removal loop (zero cost for non-seam rows), and
sub-row processing only runs for the rare seam rows (typically 1-2
per glyph).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Two bugs fixed:
- atan2f returns [-pi,pi] but sweep gradient angles are in [0,2*pi];
normalize pixel angle to [0,2*pi) so the seam matches the OT spec.
- REFLECT extend mode was identical to REPEAT because floorf after
the initial mod made period always 0.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When the current transform has rotation/skew, push_clip_rectangle now
rasterizes the actual transformed quad using edge cross-product tests
instead of approximating with an axis-aligned bounding box.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Track bounding box (min_x/y, max_x/y) on all clip masks. Paint
callbacks (solid fill, image, gradients) now iterate only within
the clip bounding box instead of the full surface.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>