Esc

pair_kerning

procedureextensionexperimentalsince 0.36.1Source
  • macOS: pair_kerning works on macOS
  • Linux: pair_kerning works on Linux
  • Windows: pair_kerning works on Windows
  • Wasm: pair_kerning is not available on Wasm

Pair adjustment in points. MONO, controls, missing glyphs and cross-face fallback pairs return zero. Results are cached by pixel size and Unicode pair; scale conversion happens on every lookup.

Signature

pair_kerning :: (
    text: *Text_System,
    left: u32,
    right: u32,
    style: Text_Style
) -> float
Example
ui := headless();
defer free_ui(*ui);
assert(pair_kerning(*ui.text, #char "A", #char "V", .{ font = .MONO }) == 0);

See also