SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Interface MeasurerProvider

    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.

    interface MeasurerProvider {
        getDeviceScale(): number;
        getInstance(): Measurer;
    }
    Index
    • The device scale for the current environment.

      Returns number

    • The best measurer for the current environment (may itself fall back to the simple measurer).

      Returns Measurer