Skip to content

Fonts: Assert when merging fonts out of order #8912

Description

@pezcode

Version/Branch of Dear ImGui:

Version 1.92, Branch: docking + string_view

Back-ends:

imgui_impl_XXX.cpp + imgui_impl_XXX.cpp

Compiler, OS:

Windows 11 + MSVC 2022

Full config/build information:

No response

Details:

When loading a font with ImFontConfig::MergeMode = true ImGui seems to assume ImFontConfig::DstFont is identical to the most recently added font:

font = Fonts.back();

This later asserts in ImFontAtlasBuildSetupFontSpecialGlyphs() because DstFont doesn't contain the config in its Sources:

IM_ASSERT(font->Sources.contains(src));

Maybe I'm misusing the API after the recent texture changes, but this used to work in 1.89.

Screenshots/Video:

No response

Minimal, Complete and Verifiable Example code:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions