The contract a per-environment measurer module must satisfy. The active default is resolved
via the @sheetxl/sdk/font/FontMeasurer conditional export:
browser -> canvas, node -> fontkit, default -> simple (the zero-dependency char counter,
the only universally-safe fallback - never pull a native/node-only measurer through default).
Override the active measurer at runtime with setSharedMeasurer (e.g. force the simple
measurer in unit tests), or at build time by aliasing the @sheetxl/sdk/font/FontMeasurer
import in the bundler config.
The contract a per-environment measurer module must satisfy. The active default is resolved via the
@sheetxl/sdk/font/FontMeasurerconditional export:browser-> canvas,node-> fontkit,default-> simple (the zero-dependency char counter, the only universally-safe fallback - never pull a native/node-only measurer throughdefault).Override the active measurer at runtime with setSharedMeasurer (e.g. force the simple measurer in unit tests), or at build time by aliasing the
@sheetxl/sdk/font/FontMeasurerimport in the bundler config.