fix(anatomy): V1-2.2 reserve the PDF halo id in the reader and composers

A drawing defining filter#osteo-halo replaced the PDF halo (a transparent
filter erased the marker); an element holding the id before the first
defs won its resolution. The reader refuses the id in any letter case
(reserved_id), both composers refuse such a tree, the halo is always the
engine's. Exact name only: osteo-overlays stays.
This commit is contained in:
bchanot committed 2026-10-30 17:30:48 +01:00
1 parent 2f1f0764bf
commit 08efd9a792
13 files changed
+781 -34

No files matched your search

+4
View File
@@ -167,6 +167,10 @@ describe('clean_svg through the shipped module', () => {
expect(cleanHorse.stored).toBe(new TextDecoder().decode(horse))
const dangling = new TextEncoder().encode('<svg xmlns="http://www.w3.org/2000/svg"><use href="#nope"/></svg>')
expect(value(glue.clean_svg(dangling)).reason).toBe('dangling_reference')
for (const id of ['osteo-halo', 'OSTEO-HALO', 'osteo&#45;halo']) {
const reserved = new TextEncoder().encode(`<svg xmlns="http://www.w3.org/2000/svg"><filter id="${id}"/></svg>`)
expect(value(glue.clean_svg(reserved)).reason, id).toBe('reserved_id')
}
const cairo = value(
glue.clean_svg(new Uint8Array(readFileSync(path(`${EXPORTS}cairo-1.18.4-pycairo-1.27.0-shapes.svg`)))),
)