API reference
Preparing search index…

ImGui.ImFontAtlas_AddFontFromMemoryCompressedBase85TTF

  • Add a font from Base85-encoded compressed TrueType data.

    Parameters

    self

    ImFontAtlas handle on which this method operates.

    compressed_font_data_base85
    string | Uint8Array

    NUL-terminated Base85 text encoding stb-compressed font data.

    size_pixels
    number

    Requested font height in pixels.

    font_cfg
    null | ImFontConfig = null

    Font-loading configuration; optional variants accept null for defaults. Ownership and merge settings affect how font data is retained.

    glyph_ranges
    null | Uint16Array = null

    Uint16Array of inclusive [first, last] pairs followed by 0. getGlyphRanges* helpers omit that terminator: append it explicitly with new Uint16Array([...getGlyphRangesDefault(atlas), 0]). Keep this input alive until atlas build; null selects default ranges.

    Returns

    null | ImFont

    Atlas-owned font handle (the destination font in merge mode). Glyphs become available after atlas building; invalid input may trigger native assertions.

    'compressed_font_data_base85' still owned by caller.

    Compress with binary_to_compressed_c.cpp with -base85 parameter.

    Source & inheritance

Icons made by Lorc, Delapouite & Skoll · game-icons.net · CC BY 3.0