API reference
Preparing search index…

ImGui.ImFontAtlas_AddCustomRectFontGlyph

  • Reserve an atlas rectangle and map it to a custom glyph in a font.

    Parameters

    self

    ImFontAtlas handle on which this method operates.

    font

    Font handle used for text drawing or for registering the custom glyph; text drawing accepts null for the current font.

    id
    number

    Unicode code point to query or add, within the range supported by this ImWchar build.

    width
    number

    Width of the custom atlas rectangle in pixels.

    height
    number

    Height of the custom atlas rectangle in pixels.

    advance_x
    number

    Horizontal pen advance in pixels after drawing the custom glyph.

    offset

    Glyph drawing offset in pixels relative to the pen position.

    Returns

    number

    Zero-based custom-rectangle index for ImFontAtlas_GetCustomRectByIndex(self, index); packing coordinates become available after atlas building.

    Source & inheritance

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