Skip to content

Commit 25ff4a6

Browse files
matmenclaude
andcommitted
notices: resvg (pattern rendering, test cases)
The pattern rendering follows resvg's (the tile, its filtering) and usvg's fix_recursive_patterns; tests/svgs/resvg holds resvg's test cases. svg.ts's header moves above the imports, so the build keeps it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lfv41PqHEGbU7SLg5onpG1
1 parent dd0a23f commit 25ff4a6

2 files changed

Lines changed: 38 additions & 4 deletions

File tree

‎THIRD_PARTY_NOTICES.md‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ following projects, under their own licenses. Each derived file says so in its h
2525
| [Pillow](https://github.com/python-pillow/Pillow) | `src/util/resample.ts` (filter coefficients, box, bilinear and bicubic filters) | MIT-CMU |
2626
| [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 |
2727
| [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), `tests/svgs/resvg` (test cases with resvg's renderings) | MIT (or Apache-2.0) |
2829
| [Unicode Character Database](https://www.unicode.org/ucd/) | `src/render/unicode-data.ts` (character properties, generated by `scripts/unicode.js`) | Unicode License v3 |
2930

3031
## fflate, Fast CRC32 in JavaScript
@@ -489,3 +490,33 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
489490
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
490491
SOFTWARE
491492
```
493+
494+
## resvg
495+
496+
```
497+
Copyright 2017 the Resvg Authors
498+
499+
Permission is hereby granted, free of charge, to any
500+
person obtaining a copy of this software and associated
501+
documentation files (the "Software"), to deal in the
502+
Software without restriction, including without
503+
limitation the rights to use, copy, modify, merge,
504+
publish, distribute, sublicense, and/or sell copies of
505+
the Software, and to permit persons to whom the Software
506+
is furnished to do so, subject to the following
507+
conditions:
508+
509+
The above copyright notice and this permission notice
510+
shall be included in all copies or substantial portions
511+
of the Software.
512+
513+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
514+
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
515+
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
516+
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
517+
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
518+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
519+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
520+
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
521+
DEALINGS IN THE SOFTWARE.
522+
```

‎src/render/svg.ts‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1-
import { decode as decodeUTF8 } from '../util/utf8.ts';
2-
import { PathCommand } from './font.ts';
3-
4-
/**
1+
/*!
52
* SVG renderer supporting a static subset of SVG 1.1/2:
63
* shapes, paths, transforms, nested svg/use/symbol, presentation attributes, inline styles and simple
74
* <style> sheets (type, class and id selectors), solid colors, linear and radial gradients, patterns, strokes
85
* (joins, caps, dashes), opacity, clip paths and luminance masks.
96
* Not supported: text, images, filters, markers, animation and scripting.
7+
* How patterns are rendered (a tile in device resolution, its filtering) and their reference cycles broken follows
8+
* resvg/usvg (https://github.com/linebender/resvg; Copyright 2017 the Resvg Authors, MIT License, see
9+
* THIRD_PARTY_NOTICES.md)
1010
*/
1111

12+
import { decode as decodeUTF8 } from '../util/utf8.ts';
13+
import { PathCommand } from './font.ts';
14+
1215
const UNSUPPORTED = new Set(['text', 'image', 'filter', 'pattern', 'marker', 'foreignObject', 'script', 'style', 'title', 'desc', 'metadata',
1316
'defs', 'clipPath', 'mask', 'linearGradient', 'radialGradient', 'stop', 'symbol', 'font', 'font-face', 'animate', 'animateTransform', 'animateMotion', 'set']);
1417

0 commit comments

Comments
 (0)