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

Braille character rendering issue with cpu and mem graphs #2

Open
xxxserxxx opened this issue Feb 15, 2020 · 32 comments
Open

Braille character rendering issue with cpu and mem graphs #2

xxxserxxx opened this issue Feb 15, 2020 · 32 comments
Assignees
Labels
bug Something isn't working needs:question Further information is requested needs:review To determine inclusion or wont-fix os:windows
Milestone

Comments

@xxxserxxx
Copy link
Owner

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
Copy link
Owner Author

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 xxxserxxx added the bug Something isn't working label Feb 15, 2020
@xxxserxxx
Copy link
Owner Author

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

@xxxserxxx
Copy link
Owner Author

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

@xxxserxxx
Copy link
Owner Author

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
Copy link
Owner Author

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

@xxxserxxx
Copy link
Owner Author

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

@xxxserxxx
Copy link
Owner Author

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

@xxxserxxx
Copy link
Owner Author

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
Copy link
Owner Author

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
Copy link
Owner Author

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
Copy link
Owner Author

@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
Copy link
Owner Author

@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
Copy link
Owner Author

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
Copy link
Owner Author

@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
Copy link
Owner Author

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
Copy link
Owner Author

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
Copy link
Owner Author

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
Copy link
Owner Author

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

@xxxserxxx
Copy link
Owner Author

@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
Copy link
Owner Author

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
Copy link
Owner Author

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
Copy link
Owner Author

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
Copy link
Owner Author

@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
Copy link
Owner Author

@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
Copy link
Owner Author

@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
Copy link
Owner Author

@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
Copy link
Owner Author

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
Copy link
Owner Author

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
Copy link

MaxSem commented Mar 3, 2020

Same thing on Windows:
image

@xxxserxxx xxxserxxx self-assigned this Mar 3, 2020
@xxxserxxx
Copy link
Owner Author

xxxserxxx commented Mar 3, 2020

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
Copy link
Owner Author

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 xxxserxxx added os:windows needs:review To determine inclusion or wont-fix needs:question Further information is requested labels Mar 3, 2020
@xxxserxxx
Copy link
Owner Author

More fixes from @dosssman at cjbassi/gotop#18

@xxxserxxx xxxserxxx added this to the v4.1.0 milestone Jun 12, 2020
@xxxserxxx xxxserxxx modified the milestones: v4.1.0, v4.2.0 Aug 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs:question Further information is requested needs:review To determine inclusion or wont-fix os:windows
Projects
None yet
Development

No branches or pull requests

2 participants