Reading SVG
dxtr edited this page 2026-10-18 17:00:38 +02:00

Page revisions

6 Commits

Author SHA1 Message Date
9e1a62ff60 Say exactly where numbers become zero
A number below 10^-45 is zero; the reader now judges a number's size
exactly, from the power of ten of its leading digit.
2026-10-18 17:00:38 +02:00
b486a81b8e Say that a number of any exponent is read
A number is at most 10^30 whatever its exponent, and one below about
10^-45 is zero; an exponent too long for a float no longer stops the
reader.
2026-10-18 16:55:29 +02:00
62a2874564 Say that shapes are held to the limit and boxes fit single-floats
A shape that reaches beyond 10^30 from the drawing's origin, its stroke
included, is left out with an svg-error, so shape-bounds always gives
single-floats; path-bounds signals an svg-error where a transform a
program gives it takes the box beyond them.  Reading SVG, Errors and
Warnings, Paths, Drawings and Shapes and the API Reference say so.
2026-10-18 16:44:24 +02:00
78789229b0 Say that transforms are held to the limit too
The transform from an element's coordinates to the drawing's is held to
10^30 at every step of composing it, from the outermost group in, and an
element whose transforms go beyond is left out, even where a transform
further in would scale back down.  Reading SVG says so where the limit
is described, and Errors and Warnings lists what CONTINUE then does.
2026-10-18 16:38:13 +02:00
1a3887dd1a Say where lengths stop and what a too wide stroke does
A length beyond 10^30 user units, as a unit or a percentage of a large
viewport may make one, is now malformed, with an error that names the
attribute and the limit; Reading SVG says so.  A stroke width that
comes to more than that where the shape is offers a CONTINUE restart
that draws the shape without its stroke, which Errors and Warnings
lists.
2026-10-18 16:29:34 +02:00
8eadc2bad4 Write cl-svgread's manual
Getting Started: the systems, requirements, installing with stift and
running the tests.  Reading SVG: what read-svg takes, which parts of
SVG it reads, which it leaves out or approximates, and xmls's limit.
Drawings and Shapes: sizes, shapes, paints and opacity, currentColor,
transforms and the view box.  Paths: the arrays, contours, arcs as
cubics, the contours as lists, bounds and counts.  Rasterizing:
cl-svgread/ft2's rasterize, its image, how strokes are made, accuracy,
threads and FreeType's place.  Errors and Warnings, and the API
Reference.  Every example was run against cl-svgread c9ea090.
2026-10-18 02:22:12 +02:00