UNPKG

autokerning

Version:

autokerning computes suggested kerning values for glyph pairs from TrueType/OpenType fonts by rendering glyph bitmaps, applying a small Gaussian blur, and measuring pixel overlap across horizontal offsets. It can be used programmatically (as an imported E

7 lines (6 loc) 270 B
import { generateKerningTable } from "./generateKerningTable.js"; export { generateKerningTable }; export async function getKerningTable(fontfile, pairs) { const res = await generateKerningTable(fontfile, { pairs, writeFile: false }); return res.kerningTable; }