Implement a minimal SVG parser/renderer that translates OpenType SVG
table documents into paint commands through the existing hb_paint_funcs_t
interface. All pixel-level rendering (gradients, compositing, clipping)
is handled by the existing hb_raster_paint_t infrastructure.
Features:
- XML tokenizer and SVG path data parser (all commands including arcs)
- Shape-to-path converters (rect, circle, ellipse, line, polyline, polygon)
- Gradient support (linearGradient, radialGradient with stops and transforms)
- SVG color parser (#RGB, #RRGGBB, rgb(), named colors, currentColor)
- CPAL palette colors via var(--colorN) with fallback support
- Transform parser (matrix, translate, scale, rotate, skewX, skewY)
- Defs/use resolution, clipPath support, group opacity
- Hook into hb-raster utility for SVG font rendering
New files: hb-raster-svg.cc, hb-raster-svg.hh, hb-raster-paint.hh
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.
hb-raster-all now renders color glyphs via hb_raster_paint_t and checks
the image format (A8 vs BGRA32) when writing PPM output. hb-ft-raster-all
also switched from PGM to PPM for consistency.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Both hb-raster and hb-ft-raster now always produce PPM (color) output,
compositing alpha over foreground/background colors. This makes the
output format consistent regardless of whether the font has color data.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implement a software paint backend (hb_raster_paint_t) that renders
COLRv0/v1 color glyphs into BGRA32 pixel buffers with no external
dependencies. Implements all 14 hb_paint_funcs_t callbacks including
solid fills, linear/radial/sweep gradients, glyph clipping, rectangle
clipping, group compositing, and BGRA image blitting.
Update hb-raster utility to detect color fonts and use the paint path,
outputting PPM (RGB) instead of PGM (greyscale).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>