Skip to content

Let an application draw its interface in another face - #621

Merged
matt-edmondson merged 3 commits into
mainfrom
claude/project-thread-9id2z4
Oct 11, 2026
Merged

matt-edmondson merged 3 commits into
mainfrom
claude/project-thread-9id2z4

Conversation

@matt-edmondson

Copy link
Copy Markdown
Contributor

Requested by Matt · project thread

Before: every ImGuiApp application draws its interface in the bundled monospace Nerd Font, and there is no way to make a proportional face the default without losing the Nerd Font icons. Characters such as ☃ or ❄ draw as the fallback diamond, because the emoji font was only allowed to answer for the U+1F000 blocks.

After: ImGuiAppConfig.InterfaceFont takes a face's bytes. That face becomes the default font, with the Nerd Font merged beneath it (icons and anything the face lacks) and emoji beneath that. The Nerd Font is still registered on its own as FontAppearance.MonospaceFontName ("mono"). FontHelper.AddInterfaceFont builds the same layered font for harnesses and tools that never run InitFonts, such as ImageGui's feature gallery. The emoji ranges now include Miscellaneous Technical, Miscellaneous Symbols, Dingbats and Miscellaneous Symbols and Arrows. A merged font in Dear ImGui 1.92 answers each character from the first source that has a glyph for it, so the text face keeps every symbol it has and emoji only fill the gaps.

How: LoadConfiguredFonts loads the face under the default name and merges the Nerd Font into it when InterfaceFont is set. The iOS atlas builder honors the setting through AddInterfaceFont. InterfaceFontTests covers the source layering, the mono registration and the new emoji ranges. CLAUDE.md's Font Configuration section notes the Private Use Area caveat: a face with PUA glyphs (Inter has some) hides Nerd Font icons unless they are stripped.

This is for ImageGui's UI review task 2 (Inter as the UI font).

🤖 Generated with Claude Code

https://claude.ai/code/session_01PRgcbZv4qnJMxWKyLZSaxE


Generated by Claude Code

ImGuiAppConfig.InterfaceFont makes a proportional face the default font,
with the bundled Nerd Font merged beneath it for icons and missing glyphs,
and emoji beneath that. The Nerd Font stays registered alone as "mono".
FontHelper.AddInterfaceFont builds the same font for harnesses and tools.

The emoji ranges now include the symbol blocks, so characters such as the
snowman fall through to emoji where the text face has no glyph.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PRgcbZv4qnJMxWKyLZSaxE
@matt-edmondson matt-edmondson self-assigned this Oct 11, 2026
Comment thread tests/ImGui.App.Tests/InterfaceFontTests.cs Fixed
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PRgcbZv4qnJMxWKyLZSaxE
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PRgcbZv4qnJMxWKyLZSaxE
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants