This is the documentation of version 1.0.0-rc.0. Go to the latest version, 1.0.0-rc.5.
TomTom Maps for JavaScript
    Preparing search index...

    Variable mapFontsConst

    mapFonts: readonly [
        "Noto-Regular",
        "NotoSans-MediumItalic",
        "Noto-Bold",
        "Noto-Medium",
    ] = ...

    All font faces available in the TomTom map style.

    Use it to select or validate fonts when creating custom layers.

    import { mapFonts } from '@tomtom-org/maps-sdk/map';

    // Check if a font is available
    if (mapFonts.includes('Noto-Bold')) {
    // Use the font
    }

    // Use as fallback list
    const textLayer = {
    type: 'symbol',
    layout: {
    'text-font': [...mapFonts]
    }
    };