Commit Graph
20276 Commits
Author SHA1 Message Date
Behdad Esfahbod 2f3ca23a07 raster/svg: handle inherit and currentColor in gradients 2026-02-25 23:10:12 -03:00
Behdad Esfahbod e46cc48295 raster/svg: add visibility/color cascade and global defs scan 2026-02-25 23:07:03 -03:00
Behdad Esfahbod 5130b0f517 raster/svg: support style props and harden gradient/url parsing 2026-02-25 22:56:49 -03:00
Behdad Esfahbod c90db60149 Merge pull request #5763 from harfbuzz/raster-svg-cleanup
Raster svg cleanup
2026-02-25 15:19:11 -07:00
Behdad Esfahbod 9fb2287351 raster-svg: document defs helper flow 2026-02-25 19:02:58 -03:00
Behdad Esfahbod c61a9f0994 raster-svg: centralize href/xlink lookup 2026-02-25 19:02:42 -03:00
Behdad Esfahbod 9c8512d701 raster-svg: split element rendering into helpers 2026-02-25 19:02:21 -03:00
Behdad Esfahbod f68fdc4aa0 raster-svg: normalize defs/render indentation 2026-02-25 18:59:18 -03:00
Behdad Esfahbod 52bebc03fd raster-svg: reuse fragment-id parsing for <use> href 2026-02-25 18:59:02 -03:00
Behdad Esfahbod d379b303ff raster-svg: tighten defs parsing helpers and stack checks
Keep stack-depth snapshots always declared with HB_UNUSED
2026-02-25 18:56:26 -03:00
Behdad Esfahbod 82e7169dbb raster-svg: dedupe url(#id) parsing 2026-02-25 18:53:26 -03:00
Behdad Esfahbod 72424f4999 raster-svg: dedupe gradient defs parsing
Reuse shared empty-clip helper in clip rectangle OOM path
2026-02-25 18:52:23 -03:00
Behdad Esfahbod bfc51d8279 raster-paint: share clip-mask rasterization helper 2026-02-25 18:50:37 -03:00
Behdad Esfahbod b86deba105 raster-svg: handle defs OOM via vector in_error 2026-02-25 18:45:54 -03:00
Behdad Esfahbod e925a8aa04 Merge pull request #5762 from harfbuzz/hb-raster-view-options
`hb-raster` view options
2026-02-25 14:42:19 -07:00
Behdad Esfahbod 953f222c2e [raster] Remove extents safety pad for view parity 2026-02-25 18:32:45 -03:00
Behdad Esfahbod 24912d7990 [raster] Fix logical bounds to avoid trailing empty line 2026-02-25 18:31:25 -03:00
Behdad Esfahbod 3f0bee360f [raster] Fix non-rainbow A8 output extents usage 2026-02-25 18:25:18 -03:00
Behdad Esfahbod b141d47b8e [raster] Implement show-extents overlays 2026-02-25 16:40:09 -03:00
Behdad Esfahbod acaf6b3f43 [view] Keep foreground palette cycling across lines 2026-02-25 16:37:06 -03:00
Behdad Esfahbod 21b8e0a4c4 [raster] Apply foreground palette cycling to non-color glyphs 2026-02-25 16:35:16 -03:00
Behdad Esfahbod f5e211094b [raster] Honor font-extents for line step with scaling 2026-02-25 16:32:28 -03:00
Behdad Esfahbod ba51d73241 [raster] Scale line-space to font units 2026-02-25 16:30:35 -03:00
Behdad Esfahbod d0149e5e2f [raster] Honor view line-space in line step 2026-02-25 16:28:24 -03:00
Behdad Esfahbod 323ae8bd6c [raster] Implement logical/ink extents selection 2026-02-25 16:26:07 -03:00
Behdad Esfahbod 6fff31e106 [util] Inline view foreground setup into post-parse 2026-02-25 16:22:10 -03:00
Behdad Esfahbod d7e890d363 [util] Run view foreground setup in post-parse hook 2026-02-25 16:18:55 -03:00
Behdad Esfahbod 1ab77842a7 [raster] Reuse shared view_options_t for CLI flags 2026-02-25 16:16:51 -03:00
Behdad Esfahbod a0e6e1de3f Merge pull request #5761 from harfbuzz/raster-svg
[raster] Rasterize simple SVG fonts
2026-02-25 12:10:50 -07:00
Behdad Esfahbod f2edc612ee Merge branch 'main' into raster-svg
# Conflicts:
#	util/raster-output.hh
2026-02-25 15:49:13 -03:00
Behdad Esfahbod 6a90ed9c39 Revert "[util/raster] Use glyph extents for margins; drop AA pad"
This reverts commit 3d48a0bce0.
2026-02-25 15:47:15 -03:00
Behdad Esfahbod fb88a3127c [docs] List new hb-raster custom palette APIs 2026-02-25 15:43:37 -03:00
Behdad Esfahbod 27d9aff7b8 [raster] Add custom palette overrides for COLR and SVG 2026-02-25 15:33:44 -03:00
Behdad Esfahbod 43d1e3fb5b [raster] Honor selected palette in SVG color resolution 2026-02-25 15:28:45 -03:00
Behdad Esfahbod 533bac1da0 [raster] Add --font-palette and pass palette to paint 2026-02-25 15:16:44 -03:00
Behdad Esfahbod bc3c22799f [svg] Inline SVG accelerator cache implementation in table header 2026-02-25 15:03:38 -03:00
Behdad Esfahbod aa41f8cf16 [svg] Move doc cache into SVG table accelerator 2026-02-25 14:34:00 -03:00
Behdad Esfahbod c447a79dc2 [raster-all] Accept SVG 2026-02-25 14:27:03 -03:00
Behdad Esfahbod 6ca6e5bfd1 [svg] Share and use SVG doc cache for raster/vector 2026-02-25 12:20:43 -03:00
Behdad Esfahbod 1997b3c1e6 [raster] Fix gradient href inheritance and bbox units 2026-02-25 12:07:34 -03:00
Behdad Esfahbod 1d1c64070b [raster] Implement SVG clip-path and gradient conformance fixes 2026-02-25 12:02:49 -03:00
Behdad Esfahbod 58ba1b6cdb [raster] Improve SVG renderer inheritance and child parsing 2026-02-25 11:51:29 -03:00
Behdad Esfahbod 3d48a0bce0 [util/raster] Use glyph extents for margins; drop AA pad 2026-02-25 11:46:42 -03:00
Behdad Esfahbod eaa141fdd0 [util/raster] Add --margin option to hb-raster 2026-02-25 11:27:25 -03:00
Behdad EsfahbodandClaude Opus 4.6 291bc6e1f2 [raster] Add SVG table rasterizer
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>
2026-02-25 11:10:35 -03:00
Behdad Esfahbod 6d23a8a211 Merge pull request #5759 from harfbuzz/hb-vector
Add `harfbuzz-vector` library for outputing to SVG (so far)
2026-02-25 05:43:15 -07:00
Behdad Esfahbod 9551492902 [vector] Use tag-valued format enum with INVALID sentinel 2026-02-24 20:44:43 -03:00
Behdad Esfahbod cbf83f2f71 [vector] Cache SVG decimal point lookup via singleton 2026-02-24 20:30:19 -03:00
Behdad Esfahbod a8e59bc6fb [vector] Emit shorthand hex colors when possible 2026-02-24 20:26:55 -03:00
Behdad Esfahbod 236d080d9f [vector] Drop linear '<svg' scan in color-glyph cache path 2026-02-24 20:23:10 -03:00