Taos API Reference
    Preparing search index...

    Interface SdfFontOptions

    interface SdfFontOptions {
        fontFamily?: string;
        fontWeight?: string | number;
        fontSizePx?: number;
        radius?: number;
        buffer?: number;
        charset?: string;
        atlasWidth?: number;
        customGlyphs?: SdfGlyphDraw[];
    }
    Index

    Properties

    fontFamily?: string

    CSS font-family list (no size/weight), e.g. '"Segoe UI", Roboto, sans-serif'. Default: a readable humanist system stack (Segoe UI / San Francisco / Roboto / Helvetica).

    fontWeight?: string | number

    CSS font-weight (400, 600, 700, 'bold'…). Default 600 — a medium weight reads well over the busy map without looking heavy.

    fontSizePx?: number

    Glyph raster size in px (bigger = crisper, larger atlas). Default 42.

    radius?: number

    SDF spread in px — how far the field extends from the edge. Default 8.

    buffer?: number

    Padding around each glyph (≥ radius avoids clipping the field). Default 8.

    charset?: string

    Characters to rasterize. Default: printable ASCII.

    atlasWidth?: number

    Atlas texture width (height grows to fit). Default 512.

    customGlyphs?: SdfGlyphDraw[]

    Extra procedurally-drawn glyphs (icons) packed into the same atlas. See SdfGlyphDraw.