Interface SVGOptions

Options of Image.renderSVG

interface SVGOptions {
    fonts?: BinaryData[];
    mode?: SVGScaleMode;
    size?: number;
}

Properties

Properties

fonts?: BinaryData[]

Fonts for <text> (TrueType, OpenType): 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. Fonts the SVG embeds with @font-face (in data: URIs, also WOFF) are used too, before these for their family names. Without any fonts text isn't rendered. Default: []

size?: number

The scale, or the width or height in pixels, see mode. Default: 1