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 combining characters not displayed #1070

Open
silmeth opened this issue May 18, 2023 · 2 comments
Open

Unicode combining characters not displayed #1070

silmeth opened this issue May 18, 2023 · 2 comments

Comments

@silmeth
Copy link

silmeth commented May 18, 2023

When using combining characters in a buffer, only the base character is displayed and the combining diacritic isn’t. This doesn’t depend on the font used.

Here is a sample text I tested it on:

/kũːl´/ an Ᵹ̇aoiꝺ̇ealᵹ

This is how nvim-qt displays it:
obraz
and here the same text displayed in Kate:
obraz

both using Noto Mono font, size 12pt (:GuiFont Noto Mono:h12 in nvim).

As you can see, Kate displays the combining tilde over u, and the dots over insular g characters.

If the dedicated codepoint for a letter with diacritic (ũ) is used, then nvim-qt correctly displays the diacritic:
kũːl´
and I’d expect the ⟨u⟩ + ⟨◌̃⟩ sequence to be displayed the same way (and other combinations that don’t have a dedicated codepoint, but might have glyphs in the font, to also be handled somehow and not just lose the combining character).

Neovim-qt version:

NVIM-QT v0.2.16.0
Build type: Release
Compilation:-g -O2 -fdebug-prefix-map=/build/neovim-qt-16pch9/neovim-qt-0.2.16=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wno-unused-parameter -std=c++11 -Wfatal-errors
Qt Version: 5.14.2
@silmeth
Copy link
Author

silmeth commented May 18, 2023

Also a comparison between nvim-qt and Kate with a non-monospaced font that has dedicated glyphs for the insular g/d + dot combinations, Junicode Two Beta (the spacing is bad, but it also shows that the combining character doesn’t get displayed even if the font has a dedicated glyph for the combination; I don’t think I have a mono font with those glyphs):

nvim-qt:
obraz

Kate:
obraz

And a font without dedicated glyph or positioning info, but which handles the dot better than Noto Mono – GNU Unifont:
nvim-qt:
obraz
Kate:
obraz

@silmeth
Copy link
Author

silmeth commented May 18, 2023

Tested with a fresh build of master too, same results.

NVIM-QT v0.2.18.9999
Build type: 
Compilation: -Wall -Wextra -Wno-unused-parameter -Wunused-variable
Qt Version: 5.15.8
Environment: 
  nvim: nvim
  args: --cmd let &rtp.=',/home/silmeth/nvim-qt-new/runtime' --cmd set termguicolors
  runtime: /home/silmeth/nvim-qt-new/runtime

Moreover, in this version I get weird results with the Noto Mono font with :GuiRenderLigatures 1 (doesn’t affect other fonts though):

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

No branches or pull requests

1 participant