You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c3ccdf2
Browse filesBrowse the repository at this point in the historyBrowse files
renderSVG draws <image> with data URIs: rasters are decoded first (the
decoders may be asynchronous; GIFs' first frame, the rest through
Image.decode), then passed to the synchronous renderer by href; SVGs
(gzipped too, via a new synchronous gunzip) render as nested documents.
Fitted like usvg: missing or auto width/height from the image,
preserveAspectRatio (clipped with slice), image-rendering; sampled like
tiny-skia (bicubic, nearest where only translated, padded edges), sharing
the pattern's sampler. An image's bounding box is its rectangle for
objectBoundingBox clips and masks. External files and URLs aren't loaded.
Nested SVG elements count towards MAX_INSTANCES (shared budget), each
href is collected once: 7 levels of 20 gzipped self-copies (1.28e9
elements) stop after 1.3 s.
resvg's image tests: 17/56 by the suite's threshold (was 0), 37/56 with
the frame's pixels ignored (tiny-skia rounds edges to quarter pixels,
the frame's 3.75 px strokes differ by more than 24); most others load
files. Patterns 32/33, markers 61/64, filters 71 unchanged; a test
checks PNG, WebP, GIF, JPEG and SVGZ data URIs pixel-exactly at 1:1.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lfv41PqHEGbU7SLg5onpG1
|[HarfBuzz](https://github.com/harfbuzz/harfbuzz)|`src/render/buffer.ts`, `src/render/layout.ts`, `src/render/shape.ts`, `src/render/shapers/*` (OpenType shaping: buffer, GSUB/GPOS, normalization, fallback positioning, the script shapers and syllable grammars), `scripts/unicode.js` (shaping category tables) | Old MIT |
27
27
|[Universal Shaping Engine data](https://github.com/harfbuzz/harfbuzz/tree/main/src/ms-use) by Microsoft |`scripts/ms-use` (category overrides, invalid vowel sequences), the tables generated from them in `src/render/unicode-data.ts`| MIT |
28
-
|[resvg](https://github.com/linebender/resvg) by the Resvg Authors |`src/render/svg.ts` (how patterns are rendered and their reference cycles broken, following resvg and usvg; the markers' placement and orientation, ported from usvg; as many cubics per arc as kurbo makes for usvg), `tests/svgs/resvg` (test cases with resvg's renderings) | MIT (or Apache-2.0) |
28
+
|[resvg](https://github.com/linebender/resvg) by the Resvg Authors |`src/render/svg.ts` (how patterns are rendered and their reference cycles broken, following resvg and usvg; the markers' placement and orientation, ported from usvg; as many cubics per arc as kurbo makes for usvg; how images are fitted, clipped and sampled), `tests/svgs/resvg` (test cases with resvg's renderings) | MIT (or Apache-2.0) |
29
29
|[Unicode Character Database](https://www.unicode.org/ucd/)|`src/render/unicode-data.ts` (character properties, generated by `scripts/unicode.js`) | Unicode License v3 |
0 commit comments