xxxserxxx / gotop

A terminal based graphical activity monitor inspired by gtop and vtop
Other
2.78k stars 140 forks source link

Braille character rendering issue with cpu and mem graphs #2

Open xxxserxxx opened 4 years ago

xxxserxxx commented 4 years ago

Gentoo. x86_64. st. I do not use tmux xd. go get.

screenshot from 2018-04-10 13-08-55

I solved deleting braille chars from your library but I want you to know about this.

xxxserxxx commented 4 years ago

I'm getting the same issue when running gotop inside st, so it looks like st doesn't support braille glyphs, at least not natively. Not sure if there's a way to fix that, maybe something has to be compiled in at build time to add support, idk.

xxxserxxx commented 4 years ago

@cjbassi Right now I am using rxvt-unicode and (I don't know why) does not support unicode braille characters xd

xxxserxxx commented 4 years ago

Yah same here, braille also doesn't show on xterm at least for me. :/

xxxserxxx commented 4 years ago

I was having a similar issue with the graphs until I installed the Symbola font. Worth a shot if you don't have it installed already.

xxxserxxx commented 4 years ago

I'm using Archlinux, solved by install package ttf-ubraille

xxxserxxx commented 4 years ago

Is this problem solved, I have the same problem, my system is manjaro, I use terminator

xxxserxxx commented 4 years ago

ttf-ubraille didn't work for me on xterm or terminator unfortunately.

xxxserxxx commented 4 years ago

By installing package ttf-ubraille and the Symbola font, and restart the terminator, the issue has be solved. I don't quite know which of these two packages works.

xxxserxxx commented 4 years ago

Still not working on xterm :(

Also, the Debian repositories don't seem to have ttf-ubraille, so that's not an option for me.

xxxserxxx commented 4 years ago

I wanted to +1 this issue with urxvt. I have installed ttf-ubraille, did not make any changes. Is there a way I can change the symbol manually with something else? Like a period or * ?

xxxserxxx commented 4 years ago

@robotdna Unfortunately not very easily atm. Gotop uses https://github.com/cjbassi/termui which uses https://github.com/cjbassi/drawille-go to draw the braille characters, and the logic is all hard coded there. I'm planning on fixing up https://github.com/gizak/termui and switching back to that, and once that happens then it should be easier to toggle the rendering character to something else.

xxxserxxx commented 4 years ago

@robotdna Unfortunately not very easily atm. Gotop uses https://github.com/cjbassi/termui which uses https://github.com/cjbassi/drawille-go to draw the braille characters, and the logic is all hard coded there. I'm planning on fixing up https://github.com/gizak/termui and switching back to that, and once that happens then it should be easier to toggle the rendering character to something else.

Okay, that makes sense. I'm not too broken up about it, it's not like the graph provides exact information haha. Thanks for looking into it.

xxxserxxx commented 4 years ago

screenshot from 2018-12-30 22-38-21 I have a somehow similar topic. Since yesterday I only see graphs like this. Tried different terminals and it occurs in any. Standard is kitty. Is this related?

The output of uname -a 4.19 & 4.20 Terminal shell (like zsh or bash) zsh Terminal emulator (like iTerm or gnome terminal) kitty Using tmux? no

xxxserxxx commented 4 years ago

@deckardstp Similar but different issue for sure. Looks like the braille characters are rending fine, but it's also showing the empty braille cells in addition to the filled in line.

xxxserxxx commented 4 years ago

There was a reddit thread posted here where the OP was having this issue and he was able to fix it when using URxvt by installing the symbola font and loading it in the .Xresources file. Seems like installing symbola was working for some people but it looks like you also have to load it in .Xresources at least for URxvt. Hope that helps someone!

xxxserxxx commented 4 years ago

There was a reddit thread posted here where the OP was having this issue and he was able to fix it when using URxvt by installing the symbola font and loading it in the .Xresources file. Seems like installing symbola was working for some people but it looks like you also have to load it in .Xresources at least for URxvt. Hope that helps someone!

This solved it for me! To try to help those who are on a similar platformgr as me with Arch+i3+urxvt: 1) grab ttf-symbola from AUR 2) fc-list | grep Symbola 3) Place the name in .Xresources as a font import. I did this: URxvt*font: xft:Symbola:style=Regular:pixelsize=14 4) don't forget to rebuild with xrdb .Xresources

This worked, thanks!

xxxserxxx commented 4 years ago

I got the same issue with braille characters rendering after creating font configuration file (see fontconfig). Without that file all works fine. Here is how my fonts.conf looks. Maybe I should add any rules for braille fonts? Can't find any information about that.

xxxserxxx commented 4 years ago

I think it's just a matter of the font config you have. In Gentoo works fine using infinality.conf

xxxserxxx commented 4 years ago

@dgrr I'm Ubuntu user. Also I'm using urxvt as my terminal emulator. Setting this line fixed rectangles in graphs

URxvt.font: xft:Fantasque Sans Mono:size=10:style=Bold, xft:symbola:size=11

I've just added xft:symbola:size=11, but seems like dots still not rendering correctly. Here is how it looks now: . It looks like graph dots have wrong spacing.

xxxserxxx commented 4 years ago

I'm having the same issues, i'm running Manjaro with kitty tho, so the fixes don't apply to me (i've tried), anybody know a workaround?

xxxserxxx commented 4 years ago

screenshot from 2018-12-30 22-38-21 I have a somehow similar topic. Since yesterday I only see graphs like this. Tried different terminals and it occurs in any. Standard is kitty. Is this related?

The output of uname -a 4.19 & 4.20 Terminal shell (like zsh or bash) zsh Terminal emulator (like iTerm or gnome terminal) kitty Using tmux? no

Did you find a solution? The issue still persist on my setup.

xxxserxxx commented 4 years ago

Did you find a solution? The issue still persist on my setup.

My original installation was deleted in the meantime. I installed a version from AUR which didn't show the issue as far as I can remember. Also I switched to tilix due to the better window tiling. My new manjaro installation doesn't show this behavior. Sorry, that I can't help you any better.

xxxserxxx commented 4 years ago

@JPUnD Do you see any fonts I have in my config that you don't have enabled for your terminal? I got mine working, at least with the ones I have here.

xxxserxxx commented 4 years ago

@JPUnD Do you see any fonts I have in my config that you don't have enabled for your terminal? I got mine working, at least with the ones I have here.

I've just realized that kitty can only use monospaced fonts, due to the way it renders text, and although i have those installed in my system, i cannot use them in kitty if they are not monospaced (it doesn't even show in the kitty command to list all available fonts).

Sadly none of the fonts you have displayed, and i've installed on my system, are monospaced.

Should i take this issue to kitty?

xxxserxxx commented 4 years ago

@JPUnD There is a fix for kitty. As suggested, you need to install symbola font (ttf-symbola in AUR), then add symbol_map U+2800-U+28FF Symbola to your kitty.conf.

image

xxxserxxx commented 4 years ago

@gkeep Damn, how did i miss that? Anyways, it does in fact work, since it replaces the character that was giving me trouble with, thanks!

xxxserxxx commented 4 years ago

Hey I had a similar problem on my machine and I fixed it by removing gnu-free-fonts. Apparently, free-font-mono was overriding the other fonts with its own type of braille (the one with the empty circles). I deleted it and installed another braille font (Dejavu Sans works nicely, as does ubraille) and it worked. Use gucharmap to see where your problematic fonts are.

xxxserxxx commented 4 years ago

Hey I had a similar problem on my machine and I fixed it by removing gnu-free-fonts. Apparently, free-font-mono was overriding the other fonts with its own type of braille (the one with the empty circles).

That's the issue I had, I would have preferred to find where to config the fallback font instead of uninstalling the one set. But it did the trick for me so thanks @omarkamalakis

MaxSem commented 4 years ago

Same thing on Windows: image

xxxserxxx commented 4 years ago

Ooof. Font issues on Windows. I'm way out of my depth on this one.

I'm not tagging this for the next release because I don't know how long it'll take me to figure it out, but if I can include it, I will.

Edit

That's... that's spectacularly ugly. But I can replicate similar behavior in a Wine console so there's hope I can fix both the ugly box outlines and the graphs.

xxxserxxx commented 4 years ago

I don't have access to a Windows machine. Would you mind changing the font to Consolas or Menlo and see if it improves the sparklines?

It looks like termui won't render prettier boxes, so improving the appearance on Windows may require changing CUI toolkits.

xxxserxxx commented 4 years ago

More fixes from @dosssman at cjbassi/gotop#18