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

cosmic-term does not render btop++ correctly #275

Open
joske opened this issue Aug 5, 2024 · 17 comments
Open

cosmic-term does not render btop++ correctly #275

joske opened this issue Aug 5, 2024 · 17 comments

Comments

@joske
Copy link

joske commented Aug 5, 2024

All other terminals I've tried (wezterm, kitty, gnome-terminal, alacritty, ...) render it correctly, so it's a cosmic-term issue.

Screenshot below is from running in GNOME, but it was the same in cosmic (installed from AUR today).

image

@joske
Copy link
Author

joske commented Aug 5, 2024

BTW, htop and top do render correctly, so not sure what btop is doing to render so badly.

@RossBarnie
Copy link
Contributor

Likely a duplicate of aristocratos/btop#890 with one user reporting the same issue in GNOME terminal, so may not be a cosmic-specific issue. I had a look through alacritty issues and couldn't see anything related.

@joske
Copy link
Author

joske commented Aug 6, 2024

No issues in GNOME terminal here. I also noticed that the nvim splash screen of astronvim also renders wonky in cosmic-term.

image

@gaspatxo
Copy link

gaspatxo commented Aug 6, 2024

I have the same issue with btm

image

─$fastfetch
             /////////////                 xxx@pop-os
         /////////////////////             ----------
      ///////*767////////////////          OS: Pop!_OS jammy 22.04 x86_64
    //////7676767676*//////////////        Host: 81LK (IdeaPad L340-15IRH Gaming)
   /////76767//7676767//////////////       Kernel: Linux 6.9.3-76060903-generic
  /////767676///*76767///////////////      Uptime: 6 hours, 46 mins
 ///////767676///76767.///7676*///////     Packages: 4504 (dpkg), 18 (flatpak-user)
/////////767676//76767///767676////////    Shell: bash 5.1.16
//////////76767676767////76767/////////    Display (CMN15E7): 1920x1080 @ 60 Hz in 16″ [External]
///////////76767676//////7676//////////    DE: GNOME 42.9
////////////,7676,///////767///////////    WM: Mutter (X11)
/////////////*7676///////76////////////    WM Theme: Orchis-Dark
///////////////7676////////////////////    Theme: plastique [Qt], adw-gtk3-dark [GTK2/3/4]
 ///////////////7676///767////////////     Icons: Tela-blue [Qt], Papirus-Dark [GTK2/3/4]
  //////////////////////'////////////      Font: qt5ct [Qt], Open Sans (10pt, Light) [GTK2/3/4]
   //////.7676767676767676767,//////       Cursor: phinger-cursors-light (24px)
    /////767676767676767676767/////        Terminal: x-terminal-emulator
      ///////////////////////////          CPU: Intel(R) Core(TM) i7-9750HF (12) @ 4.50 GHz
         /////////////////////             GPU: NVIDIA GeForce GTX 1650 Mobile / Max-Q [Discrete]
             /////////////                 Memory: 7.16 GiB / 15.53 GiB (46%)
                                           Swap: 768.00 KiB / 19.53 GiB (0%)
                                           Disk (/): 680.52 GiB / 928.94 GiB (73%) - ext4
                                           Disk (/recovery): 2.85 GiB / 3.99 GiB (71%) - vfat
                                           Local IP (tun0): 10.2.18.105/24
                                           Battery: 25% [Discharging]
                                           Locale: en_US.UTF-8

@hbacelar8
Copy link

Maye it's the font? Since we cant set custom fonts...

@MoSal
Copy link
Contributor

MoSal commented Aug 8, 2024

If possible, install a monospace font with braille support like iosevka and report back.

@joske
Copy link
Author

joske commented Aug 9, 2024

Tried several monospace fonts, but it does not make any difference. Even with fonts that I know work in other terminals.

@MoSal
Copy link
Contributor

MoSal commented Aug 9, 2024

@joske Not everything necessarily gets rendered by the font you select. And the font fallback process is different as other terminals may use fontconfig, I think, while COSMIC uses a completely different text stack. Also, COSMIC doesn't do stuff like resizing individual rendered characters to a monospace width (which is a known source of broken rendering for any joined script in other terminals).

Did you try installing the iosevka font? You don't have to select it. It should be automatically picked as a fallback for the characters it supports.

@joske
Copy link
Author

joske commented Aug 9, 2024

After installing iosevka font, btop renders correctly. However, the nvim splash screen still doesn't.

@drazil100
Copy link

I also have this issue.

@RedBearAK
Copy link

There was an issue like this in years past that pretty much exclusively seemed to happen in Konsole. I believe it was also a font fallback problem.

Installing the Iosevka font as suggested cured the misalignments for me in cosmic-term. I did not have to select it, the selected font is still a version of Fantasque Sans Mono with no ligatures, no loop-K, large line height, that has been converted with the Nerd Font script. I use it on every platform I can. Many different desktop environments and terminal apps.

So I guess the theory is that the braille characters before installing Iosevka were coming from a fallback font with bad character alignment for those characters, or just was not a monospace font, or something like that. (I don't know that much about how fonts work.)

Pretty weird though, how you could briefly see the lines extending off to the right of the main terminal area if you expanded the cosmic-term window to the right. The lines are fully rendering, just mostly being hidden behind the right edge of the window border.

@jackpot51
Copy link
Member

The main issue has been identified by others and I want to state it plainly and clearly:

The default braille font does not fit properly into the grid cells of the default monospace font, causing it to push future characters to the right and break alignment.

@drazil100
Copy link

After bricking my system (tried to do a system update with the systemd-sysext method of running cosmic so I disabled that service and cosmic froze mid update) I finally got up and running and was able to install this font. It DID fix the issue but it still looks pretty off. Not sure if it has to do with my 1366x768p display, the fractional scaling I applied in .local/state or what but there shouldn't be spaces between the lines.
image

For reference this is what it is supposed to look like
image

Btw don't worry I didn't lose anything important in the bricking other than 3 days of compile time on cosmic-sysexe. I am running pop now :)

@RedBearAK
Copy link

@drazil100

I see the gaps in the same way on a mini PC with COSMIC desktop installed on Fedora 40. The Iosevka font fixes the misalignment from the braille characters, but there's still some misalignment on a couple of lines where a large filled triangle graphic character keeps replacing a smaller filled triangle, in the network box.

Strangely, I don't see the gaps in a virtual machine with the same Fedora 40 and COSMIC combination. But there are a few gaps in a virtual machine with Pop!_OS 24.04 LTS alpha.

Maybe there needs to be another default font to fix the graphical shape characters.

@leviport
Copy link
Member

Potential duplicate of pop-os/cosmic-text#237

@sohrob
Copy link

sohrob commented Aug 27, 2024

I have this same issue with bottom.

@leviport
Copy link
Member

leviport commented Aug 27, 2024

Bug is pop-os/cosmic-text#237

Locking thread to consolidate discussion into a single issue

@pop-os pop-os locked and limited conversation to collaborators Aug 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants