-
-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Material Design Icons & ImGui #16
Comments
It looks like you can't use MDI with Dear ImGui. The MDI fonts moved to using 32 bit codepoints and Dear ImGui only supports 16 bit. |
Is this issues fixed by |
It might do but you'd have to use the IconsMaterialDesignIcons_c.h file as IconsMaterialDesignIcons.h only supports 16 bits. I might take a look at this in future. Right now I don't have the time. |
Thanks |
Adding some notes for anyone who finds this issue: IconFontCppHeaders now support both 16bit and 32bit maximum fonts. For 16bit font ranges use the example code with: static const ImWchar icons_ranges[] = { ICON_MIN_MDI, ICON_MAX_MDI_FA, 0 }; and for 32bit font ranges use the example code with: static const ImWchar icons_ranges[] = { ICON_MIN_MDI, ICON_MAX_MDI, 0 }; Since the commit mentioned above Dear ImGui now supports 32bit font codepoints internally, which requires setting the //---- Use 32-bit for ImWchar (default is 16-bit) to support unicode planes 1-16. (e.g. point beyond 0xFFFF like emoticons, dingbats, symbols, shapes, ancient languages, etc...)
#define IMGUI_USE_WCHAR32 |
Hello,
I tried to load the MDI font with ImGui, using the code passed in the Readme to load it :
but the text using the icons keeps showing me no icons and incorrect characters.
Using this code
ImGui::Button(ICON_MDI_PLAY);
show me this :I also looked in the Styles editor of imgui, but the font doesn't appear in the default font.
I tried with Font Awesome 5, and everything worked fine.
The text was updated successfully, but these errors were encountered: