Skip to content

Add commonly used font ranges when building font#24

Open
Nukoooo wants to merge 1 commit intocursey:masterfrom
Nukoooo:font_ranges
Open

Add commonly used font ranges when building font#24
Nukoooo wants to merge 1 commit intocursey:masterfrom
Nukoooo:font_ranges

Conversation

@Nukoooo
Copy link
Copy Markdown
Contributor

@Nukoooo Nukoooo commented Feb 6, 2025

Without this imgui just shows ????? when a string contains any CJK characters

@angelfor3v3r
Copy link
Copy Markdown
Contributor

Adding some notes here for later:
Dear ImGui v1.92.0 added better font support, instead we can merge CJK fonts into the primary font. The AddFontFromFileTTF function size is optional now (not sure what comes first: FontSizeBase or the font size argument).

There is also this in ImFontConfig:

const ImWchar*  GlyphExcludeRanges;     // NULL     // Pointer to a small user-provided list of Unicode ranges (2 value per range, values are inclusive, zero-terminated list). This is very close to GlyphRanges[] but designed to exclude ranges from a font source, when merging fonts with overlapping glyphs. Use "Input Glyphs Overlap Detection Tool" to find about your overlapping ranges.

which we could make use of.

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