hoffstadt / hoffstadt/DearPyGui

Rebinding Font to Support New Unicode Characters

Open
#2,416 1 comment 0 reactions 0 assignees View on GitHub
state: pending type: bug
Dominant language
C++
Stars
15.6k
Forks
783
PR merge metrics
No merged PRs in 30d

Description

In DearPyGui, I’m experiencing an issue with dynamically loading Chinese characters. Initially, I load a subset of frequently-used characters, but when new characters are added dynamically (e.g., through lazy-loading or on-demand loading), they don’t render correctly and show as garbled text or “??”.

To address this, I attempted to reload and rebind the font with the updated character set each time new characters are detected. However, despite reloading, the new characters do not display properly, and previously loaded characters continue to display fine.

I would like to confirm:

1. **Does DearPyGui (or its underlying ImGui) support dynamically reloading and rebinding fonts to handle new characters during runtime?**
2. **If so, what is the correct way to rebind the font so that new characters display correctly without recreating the entire font each time?**

Any guidance on effectively updating the font to support additional characters without affecting performance or display would be greatly appreciated.

![Snipaste_2024-11-09_12-47-25](https://github.com/user-attachments/assets/12ec9073-ca9e-494d-85f7-5d9573461aca)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.