SubsetFontFn
The function that cuts a font down to the characters of a string, in the shape of subset-font: the font file, the text whose glyphs stay, and the options.
The function that cuts a font down to the characters of a string, in the shape of subset-font: the font file, the text
whose glyphs stay, and the options. It answers the new font.
Import#
ts
import type { SubsetFontFn } from "@shadow-js/dusk/vite";
Signature#
ts
type SubsetFontFn = (
font: Uint8Array,
text: string,
options: { readonly targetFormat: "woff2" },
) => Promise<Uint8Array>