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

12 lines 504 B
import { Glyph } from "./glyph.js"; /** * Compute pixel overlap using composition logic from Python version * * Intersection rectangle layout: * - Right glyph at x ∈ [0, right.width) * - Left glyph at x ∈ [lOffset, lOffset + left.width) * - Only pixels in both ranges contribute to overlap */ export declare function overlap(left: Glyph, right: Glyph, kern: number): number; export declare function setGlyphBboxOffset(glyph: Glyph, offsetX: number): void; //# sourceMappingURL=overlap.d.ts.map