contour-terminal / contour

Modern C++ Terminal Emulator
http://contour-terminal.org/
Apache License 2.0
2.37k stars 102 forks source link

Characters render on top of ligatures #1349

Closed stellarskylark closed 3 months ago

stellarskylark commented 8 months ago

Contour Terminal version

0.3.12

Installer source

something else (please specify below)

Operating System

Fedora Linux 39

Architecture

x86-64

Other Software

The Monaspace Xenon font (specifically the Nerd Font)

Steps to reproduce

Type a ligature, then continue typing, and the new text will overlap the ligature. The cursor position seems to respect the glyphs being multiple columns wide, but the renderer still treats it as a single-width character and draws on top of it. (For the font in question, Monaspace Xenon, you'll need to enable the ligature font features.)

Expected Behavior

No response

Actual Behavior

2023-11-30-142321_1366x768_scrot

Additional notes

Installed via the official Fedora package

uspasojevic96 commented 8 months ago

Do you have strict spacing set to true?

stellarskylark commented 8 months ago

Yes, I'm more or less running the default config, minus changing some colors. You can see the full thing here if you think something might be relevant. https://git.solarpunk.moe/stellarskylark/dotfiles/src/branch/main/contour.yml

christianparpart commented 8 months ago

Hey @stellarskylark. Many thanks for your interest in Contour.

I was looking into trying to repro this. I however cannot find the font Monaspace Xenon as specified by you above on the nerd font github page: https://github.com/ryanoasis/nerd-fonts/releases/latest/

Would you mind directing me to the download link or give me the name of the file I should download to try?

Mind, the strict_spacing configuration only mandates whether or not to exclude non-strict-spacing advertised fonts. Experience has (sadly!) shown that it's more often than not a good idea to have that value defaulting to true. We should probably change that.

@stellarskylark did you try other fonts also? I am personally using JetBrainsMono (also from nerd fonts), and I see ligatures a lot using that font. :)

Many thanks.

EDIT: p.s.: maybe I overlooked it, but I could not find how you installed Contour. Did you install from source? Or would you at least be able to install from source or take .rpm packages in case would be pointing you to one?

stellarskylark commented 8 months ago

@christianparpart Heya yeh, the download link is https://github.com/ryanoasis/nerd-fonts/releases/download/v3.1.1/Monaspace.tar.xz -- it has all five variants in that download, including the slab-serif variant, Xenon. To load it the font name is MonaspiceXe NF.

I just tested JetBrainsMono Nerd Font and text does render correctly for it, so I'll switch to it in the meantime while I wait on a fix for this. (I really like the look of Monaspace, and the "texture healing" feature is just lovely).

I installed Contour via dnf to get the official Fedora package. But if you send source code or an RPM I can definitely test it out!

christianparpart commented 8 months ago

Ah, many thanks, good to know. I'm currently fixing some other bug in the meantime and try to get back to MonaspiceXe NF after that.

NB: Fedora should be quite quick in adopting future releases of Contour. It has proven very responsive in the past. I was simply asking for bug-fix confirmation testing. But I'm also sure I should be able to repro it as soon as I can work on it again.