cosmic-text icon indicating copy to clipboard operation
cosmic-text copied to clipboard

Potential weirdness with non-text characters

Open leviport opened this issue 1 year ago • 5 comments

I've seen a few instances of spacing and alignment weirdness in cosmic-term and cosmic-edit with non-text characters. The easiest way to show this is in typeracer in the screenshot below, where you can see the border has gaps at the corners of the text boxes. Comparing it to kgx or another terminal, the text boxes don't have gaps.

screenshot-2024-02-23-16-32-47

I've also seen instances of btop get messed up alignment because of the bullet point character it prints in its usage meters, but I don't have a screenshot of this at this time.

leviport avatar Feb 23 '24 16:02 leviport

I believe the btop issue is due to incorrect width calculation of braille fonts. @MoSal do you have ideas on this?

jackpot51 avatar Feb 23 '24 18:02 jackpot51

Gave typeracer a test (it's this one btw).

cosmic-text is falling back to "Nimbus Mono PS" for some glyphs, and "JetBrains Mono" for others.

Changing font settings to "JetBrains Mono" makes the issue go away.

The Nimbus font comes from the gsfonts package which is required by graphviz and libwmf (a dependency of gimp).

Maybe at some point, setting a first fallback choice should be implemented and exposed as a user setting, hoping it wouldn't prove to be a slippery slope (users requesting 2nd, 3rd, 4th,... fallback choices).

MoSal avatar Feb 23 '24 20:02 MoSal

As for Braille chars, I didn't try it, but according to pop-os/cosmic-term#66, to guarantee correct rendering, a Monospace font with braille support is required (Iosevka was mentioned), and making sure font-weight is set to a value supported by such a font.

MoSal avatar Feb 23 '24 20:02 MoSal

screenshot-2024-05-21-16-35-40 The screenshot shows kitty and the cosmic terminal both running btop. - Is it known that for example btop looks a little messed up when compared to kitty?

Morriarthy avatar May 23 '24 07:05 Morriarthy