import type { SvgPictureFontWarning } from '../vdt.js'; import { type InlineSvgFontsOptions, type SvgFontInlining, type SvgFontProvider, type SvgFontWarning } from './fonts.js'; export interface PrepareSvgOptions extends Omit { /** Where the faces come from. Default {@link registeredFontProvider} * (what `loadBundleFonts` and `registerFontBytes` registered, then the * page's `@font-face` rules). */ fonts?: SvgFontProvider; /** Embed the faces at all. Default true; false leaves the markup as it * is (`resources[].svg.inlineFonts: false`, * `diagramStyle.inlineFonts: false`). */ inlineFonts?: boolean; /** Recolour to this ink first (`diagramStyle.singleInk`), with * `applySingleInkToSvg`. */ inkHex?: string | null; /** The picture's ids, carried by the warnings. */ fileId?: string; resourceId?: string; /** Told of a family with no face and of the size cap. */ onWarning?: (warning: SvgPictureFontWarning) => void; } /** Turn an inliner warning into the one a host reports. */ export declare function svgPictureFontWarning(w: SvgFontWarning, fileId: string, resourceId?: string): SvgPictureFontWarning; /** SVG markup as an image should get it: recoloured to `inkHex` when * given, then with the faces its text names inlined (unless * `inlineFonts` is false). Never store the result: it carries font * files. */ export declare function prepareSvgMarkup(svgText: string, options?: PrepareSvgOptions): Promise; /** Decode SVG markup into an ``. Browser only. */ export declare function decodeSvgImage(svgText: string): Promise; export type RegisterSvgImageOptions = Omit; /** * Prepare SVG markup ({@link prepareSvgMarkup}: single ink, then the * document's fonts inlined), decode it and register it with the canvas * backend as a vector source. A picture recoloured here is registered * with `singleInk: false`, so the canvas never tints it again. Resolves * to what became of each face. Browser only. * * ```ts * await loadBundleFonts(bundle); // or registerFontBytes(…) * await registerSvgImage('chart.svg', svgText); * ``` */ export declare function registerSvgImage(fileId: string, svgText: string, options?: RegisterSvgImageOptions): Promise; //# sourceMappingURL=image.d.ts.map