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

Unicode rendering of Tone contour via Tone letters #4922

Closed
immetoo2 opened this issue Jan 20, 2022 · 3 comments
Closed

Unicode rendering of Tone contour via Tone letters #4922

immetoo2 opened this issue Jan 20, 2022 · 3 comments

Comments

@immetoo2
Copy link

Version/Branch of Dear ImGui:

Version: 1.86

Back-end/Renderer/Compiler/OS

Back-ends: imgui_java_impl_glfw via opengl3
Operating System: Debian

My Issue/Question:

Trying to get imgui to render the tone contours which are defined by tone letter sequences.
After adding a few fonts imgui renders the tone letters correct, but never the tone contours.

For example the sequence (without spaces) of "˧ ˩ ˥" should render as; ˧˩˥

Screenshots/Video

imgui-tone-letters

Standalone, minimal, complete and verifiable example:

As background i'm trying to render the matrix. (to have unlimited minecraft world space)

Absolute coordinate system
  ˧˥˩ ________ ˧˥˦
  |\       :\
  | \      : \
  |  \     :  \
  |   ˧˥˥---------˧˦˦
  |   :    :     :
  ˧˩˥ ___ :____˧˩˨    :
  \   :      \   :
   \  :       \  :
    \ :        \ :
     \˧˩˩_________˧˨˨

Relative coordinate system

    ˩˩˧   ˥˦˧   ˦˦˧
    \ | /
     \|/
    ˩˥˧-- O --˥˩˧
     /|\
    / | \
    ˨˨˧   ˩˨˧    ˥˥˧ 

Exponential WordQᵤ₈ₑ Tone⋇Kali Darthᵛᴬᴰᴰᴱᴿ

EW₁T5D⁴ = Startrek HEX
˧˥˩˧˩˥˧˥˦˧˩˨˧˦˦˧˨˨˧˥˥˧˩˩˥˩˧˩˥˧˥˦˧˩˨˧˦˦˧˨˨˧˥˥˧˩˩˧

EW₂T5D⁴ = Dīpāvalī Routing
˧˥˩⁰˧˩˥¹˧˥˦²˧˩˨³˧˦˦⁴˧˨˨⁵˧˥˥⁶˧˩˩⁷˥˩˧⁸˩˥˧⁹˥˦˧ᵃ˩˨˧ᵇ˦˦˧ᶜ˨˨˧ᵈ˥˥˧ᵉ˩˩˧ᶠ

EW₃T5D⁴ = 3Dᵛᴼˣᴱˡ Numbers
˧˥˩⁰˧˩˥¹˧˥˦²˧˩˨³˧˦˦⁴˧˨˨⁵˧˥˥⁶˧˩˩⁷˥˩˧⁸˩˥˧⁹˥˦˧ᵃ˩˨˧ᵇ˦˦˧ᶜ˨˨˧ᵈ˥˥˧ᵉ˩˩˧ᶠ = red
˧˥˩₀˧˩˥₁˧˥˦₂˧˩˨₃˧˦˦₄˧˨˨₅˧˥˥₆˧˩˩₇˥˩˧₈˩˥˧₉˥˦˧ₐ˩˨˧₆˦˦˧꜀˨˨˧ₔ˥˥˧ₑ˩˩˧բ = blue
OR
⁰˧˥˩₀¹˧˩˥₁²˧˥˦₂³˧˩˨₃⁴˧˦˦₄⁵˧˨˨₅⁶˧˥˥₆⁷˧˩˩₇⁸˥˩˧₈⁹˩˥˧₉ᵃ˥˦˧ₐᵇ˩˨˧₆ᶜ˦˦˧꜀ᵈ˨˨˧ₔᵉ˥˥˧ₑᶠ˩˩˧բ

That is the basis for relative or unlimited voxel math in 3D space.

@ocornut
Copy link
Owner

ocornut commented Jan 20, 2022

For example the sequence (without spaces) of "˧ ˩ ˥" should render as; ˧˩˥

This is not supported and we don't expect to support parsing of Unicode sequences like that, sorry.

@immetoo2
Copy link
Author

Yes i noticed, so i asked, as it works in (almost) all other applications.
Will try to draw them manually or use an texture as a workaround.
Thank for the quick reply.

@ocornut
Copy link
Owner

ocornut commented Jan 20, 2022

as it works in (almost) all other applications.

We use our own text rendering with really dumb text shaping. There aren't many solutions, bringing in e.g. harfbuzz would largely outweight the library size by one order of magnitude and wouldn't work without massive caching of everything which is far off from how dear imgui is designed. So the TL;DR; is it is unlike we'll ever support that sort of fancy Unicode feature in main line soon, but some people have had success doing that (e.g. #4227). Let's close this to #4227 if anything.

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