Skip to main content

measurementHelpers

  • getAccurateCharWidth — Probe average glyph width in the editor font.
  • measureTokenWidthAccurate — Width of a rendered token node.
  • getVisualTextForToken — Display string used for measurement (pills vs raw).

Feeds WidthMeasurement and enhanced positioning utilities.


Sources: src/lib/rich-input/utils/measurementHelpers.ts