Skip to content
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

emoji \ufe0f #8240

Open
llxiaoyuan opened this issue Dec 18, 2024 · 3 comments
Open

emoji \ufe0f #8240

llxiaoyuan opened this issue Dec 18, 2024 · 3 comments

Comments

@llxiaoyuan
Copy link

llxiaoyuan commented Dec 18, 2024

Version/Branch of Dear ImGui:

Version 1.XX, Branch: XXX (master/docking/etc.)

Back-ends:

imgui_impl_XXX.cpp + imgui_impl_XXX.cpp

Compiler, OS:

win10

Full config/build information:

No response

Details:

I am rendering some emojis, where ImGui::Begin(u8"\u2708\ufe0f");. Since I am using a custom rectangle fill method, I only filled the \u2708, how can I skip this \ufe0f during rendering?

image

@ocornut
Copy link
Owner

ocornut commented Dec 18, 2024

I don't understand your question or the reasoning. You are submitting two characters and only want one to render. Why not submitting a single character?

@llxiaoyuan
Copy link
Author

Because the airplane symbol itself consists of two characters, with the latter character indicating color.

@ocornut
Copy link
Owner

ocornut commented Dec 18, 2024

You can technically use a trick of adding an empty glyph using ImFont::AddGlyph() with all zero values. Syntax may break in future version.
But the reasonable answer is that we are not supporting all Unicode features such as colors changes, and not aiming to support them.

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

No branches or pull requests

2 participants