Closed zeroxer closed 5 years ago
Ligatures are not supported. In fact our whole text rendering pipeline is quite poor, mostly in order to make size calculation as fast as possible. If we were to support any better text rendering we should transition to a model where we can cache sizes and maybe text layout (separately).
TL;DR; Extremely unlikely in the mid term.
Thanks for your reply. Maybe I would try to implement it in the other way.
You can use the Private Use Area for font glyphs and do the replace of the multi-symbol markers with those unicode code points in the text rendering.
I am going to close this as unsupported and not planned. As ratchetfreak pointed out, you may also use ImFont::AddRemapChar()
after atlas building to redirect certain codepoint to others, and may get away with this as workaround depending on your use case.
Ok.Thanks. I think ImFont::AddRemapChar()
is what I need.
I want to use a font that designed for programming symbols, which can change two or more characters to one font character, as the following picture shows.
FiraCode: Monospaced font with programming ligatures. Github: https://github.com/tonsky/FiraCode
Is there anyway to support this in ImGui ?