Skip to content

How to render colored emoji? #4169

Closed
Closed
@AllenDang

Description

Version/Branch of Dear ImGui:

Version: 1.82
Branch: master

Back-end/Renderer/Compiler/OS

Back-ends: imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp
Operating System: MacOS

My Issue/Question:

How to render colored emoji?

Here is what I've done:

  1. Add #define IMGUI_USE_WCHAR32 to imconfig.h.
  2. Add "Apple Color Emoji.ttc" font with minimal glyph range "⌚️<-watch 😊<-smile" to test emoji rendering.
  3. Create imgui.TextUnformated("⌚️<-watch 😊<-smile")

The emoji doesn't be rendered. Do I have to change anything in the renderer or platformer to render them correctly?

Screenshots/Video
截屏2021-05-24 下午6 03 55

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions