import type { DecodedImage } from './mask.js'; /** * Text on a decoded image, without a browser: what the change image labels * itself with. * * The glyphs are Inter, drawn once by `tools/glyph-atlas.mjs` at 64 pixels into * `glyphs/`, and scaled down here by area, so a label keeps the face's own * anti-aliasing at any size up to that. Inter is under the SIL Open Font * License 1.1, in `glyphs/inter-LICENSE.txt`. */ export type Weight = 'regular' | 'semibold'; /** How wide `text` sets at `size` pixels. */ export declare function measureText(text: string, size: number, weight?: Weight): number; /** `text`, cut with an ellipsis where it would set wider than `width`. */ export declare function fitText(text: string, size: number, width: number, weight?: Weight): string; /** * Sets `text` on `image` with its baseline at `baseline` and its left edge at * `x`, `size` pixels to the em, in `colour`, clipped to columns `x` to `limit`. */ export declare function drawText(image: DecodedImage, text: string, x: number, baseline: number, size: number, colour: readonly number[], weight?: Weight, limit?: number): void; //# sourceMappingURL=text.d.ts.map