OptionalfontFonts for <text> (TrueType, OpenType or WOFF; not WOFF2 or some newer OpenType outline formats such as CFF2):
each text gets the face its font-family, font-weight, font-style
and font-stretch match best among them, by the names, weights and styles in the fonts (like browsers match
installed fonts). Generic families (serif, sans-serif, monospace, ...) are the first font that fits them,
other families and text without one get the first font's family; characters a face doesn't have come from the
other fonts (TrueType, OpenType or WOFF). Fonts the SVG embeds with @font-face (in data: URIs) are used too,
before these for their family names. Without any fonts text isn't rendered (an empty array is the same as no
option here; Image.renderText needs a font and throws for it). One font can be given without an
array. A font here that can't be read throws an Error, like in Image.renderText; a damaged font that the
SVG embeds is left out
OptionalimagesImages for the <image> elements (and feImage) by their href, the same string the SVG uses: with
images: { 'logo.png': bytes }, <image href="logo.png" .../> draws the image. Values are encoded images (PNG,
JPEG, WebP, GIF's first frame, ...) or Images, decoded like data URI images are, and only for the hrefs
the SVG references. Nothing else is read: no files and no URLs, so drawing an image whose href isn't given (and
isn't a data URI) throws, as does drawing one that can't be decoded. SVG documents can't be given this way, use a
data URI for them
OptionalmaxMaximum total pixels of the raster images the SVG references (data URIs and SVGResourceOptions.images), decoded together; already-decoded Image values are used as supplied and don't count. Drawing an image beyond the limit throws a LimitError (a RangeError)
OptionalmaxMaximum pixels of the layers rendering uses at once, the output's included. Groups with opacity, masks, clip
paths of nested viewports, filters and blend modes are each rendered into a layer of their own (up to the
output's size, 16 bytes per pixel) while their content is drawn, so deeply nested ones multiply the memory a
small SVG takes. Exceeding it throws a LimitError (a RangeError). With the defaults, rendering can take
about 90 bytes per pixel of maxPixels (64 for the layers, up to 20 for the images, 4 for the output): lower
maxPixels to bound it for untrusted SVGs.
Three limits on the work of a render don't depend on these options, and grow with the size of the output (so
lowering maxPixels is what bounds them too). Each throws a LimitError when exceeded:
<use> counted, a command of a glyph outline 16), one path of 2²¹ (texts excepted)feConvolveMatrix per 9 taps of its kernel, an
feTurbulence per octave, an feMerge per node)OptionalmaxMaximum total pixels in the rendered output. Output over the limit throws a LimitError (a RangeError) before anything is rendered. It's also the default of SVGResourceOptions.maxLayerPixels and SVGResourceOptions.maxImagePixels. The work limits of rendering grow with it: see SVGResourceOptions.maxLayerPixels
The limits, fonts and images of Image.renderSVG, part of RenderSVGOptions