You are not logged in.

#1 2020-06-02 01:15:35

tedd
Member
Registered: 2013-02-21
Posts: 26

Problem displaying braille characters in gotop in Konsole

I have a virtual machine and a laptop, both running Arch, both updated today, both running KDE, using konsole 20.04.1-3 and gotop 3.5.3-1.
I can't get the graphs in gotop to display correctly in konsole on the laptop, but I can in my virtual machine.
I created a new user for the default KDE settings, opened konsole and ran gotop.

The problem occurs when using the regular or book form of any monospaced font (I didn't try variable-width fonts) - the graphs just show big block characters. When I choose the italic, oblique or bold form (anything other than the regular) the graphs show properly. This also happens in vtop.

Images to illustrate the problem

Would konsole be the correct package to report a bug to? But then why does my virtual machine work correctly?

Last edited by tedd (2020-06-02 01:17:31)

Offline

#2 2020-06-02 02:37:57

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: Problem displaying braille characters in gotop in Konsole

You probably don't have any font installed that has Braille characters in it, or at least not in its 'regular' look. Try installing "ttf-dejavu" and see what happens.

Arch has no list of fonts that are installed by default. You need to install a bunch yourself.

Last edited by Ropid (2020-06-02 02:39:43)

Offline

#3 2020-06-02 02:46:08

tedd
Member
Registered: 2013-02-21
Posts: 26

Re: Problem displaying braille characters in gotop in Konsole

Ropid wrote:

You probably don't have any font installed that has Braille characters in it, or at least not in its 'regular' look. Try installing "ttf-dejavu" and see what happens.

Arch has no list of fonts that are installed by default. You need to install a bunch yourself.

Um, I do. I have the same fonts ttf-dejavu on the virtual machine and on my laptop. This problem happens with all monospaced fonts I have. Deja-vu sans mono is my default, which doesn't work, and the default for new users is Hack, with also doesn't work.

Edit: Unhelpful and incorrect unilateral statement. This is what I meant to say.

Last edited by tedd (2020-06-06 08:55:18)

Offline

#4 2020-06-02 02:57:31

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: Problem displaying braille characters in gotop in Konsole

I just tried checking here with some character map tool I had installed, and DejaVu Sans Mono seems to have Braille characters in it. Is this then really maybe a bug in Konsole? Can you try a different terminal program? I'm using xfce4-terminal here and Braille works.

Offline

#5 2020-06-02 06:52:01

seth
Member
Registered: 2012-09-03
Posts: 58,399

Re: Problem displaying braille characters in gotop in Konsole

DejaVuSansMono doesn't have the braille glyphs (neither the single dot, nor the more complex shapes)
Let's see what resolves them for you (on the working and non-working setup)

FC_DEBUG=4 pango-view --font="DejaVu Sans Mono" -t "⠁" | grep family:

My money is on Hack.
Also ensure you're not using Hack as default font in konsole - it's a BS Very derivate just as DejaVu, thus close to impossible to tell from a screenshot :-(

Online

#6 2020-06-02 10:08:16

tedd
Member
Registered: 2013-02-21
Posts: 26

Re: Problem displaying braille characters in gotop in Konsole

I don't normally use Hack. My preferred default is DejaVu Sans Mono, as it's one of the few who don't bugger up the 1/l problem at various sizes. I think it might've been consolas or inconsolata that reverted to a single-pixel difference at 9 or 10pt?

Regardless, I'm only mentioning Hack because that seems to be the default for new users on both machines.

Output of your command.

I also installed xfce4-terminal on both machines. Same problem there.
I'd like to repeat that the braille works on both machines when using dejavu sans mono (and hack) with either italic, bold or bold italic. Just not regular.

Last edited by tedd (2020-06-02 10:08:29)

Offline

#7 2020-06-02 11:19:38

seth
Member
Registered: 2012-09-03
Posts: 58,399

Re: Problem displaying braille characters in gotop in Konsole

Errr… the text it prints would be more interesting, but apparently there /is/ a difference (though both say "DevaVu Sans Mono - Laptop")

Online

#8 2020-06-02 12:57:29

tedd
Member
Registered: 2013-02-21
Posts: 26

Re: Problem displaying braille characters in gotop in Konsole

Sorry. It's getting late. Fixed the image description.

Laptop

Virtual machine

Offline

#9 2020-06-02 13:08:44

seth
Member
Registered: 2012-09-03
Posts: 58,399

Re: Problem displaying braille characters in gotop in Konsole

Laptop is resolved from FreeMono, VM from DejaVu Sans

Online

#10 2020-06-05 08:02:40

tedd
Member
Registered: 2013-02-21
Posts: 26

Re: Problem displaying braille characters in gotop in Konsole

OK. How do I fix this? I don't remember making any changes to font-related configuration on any machine.

Offline

#11 2020-06-05 11:11:59

seth
Member
Registered: 2012-09-03
Posts: 58,399

Re: Problem displaying braille characters in gotop in Konsole

Purge FreeMono or move DejaVu up in the substitution preference.
If you don't want to remove FreeMono, notice that preferring variable width font in the fixed width list is technically "wronger".

Online

#12 2020-06-06 01:58:50

tedd
Member
Registered: 2013-02-21
Posts: 26

Re: Problem displaying braille characters in gotop in Konsole

Purge FreeMono, the package? Where is the substitution preference, and why is it different on each machine? Which package is responsible for this? Konsole, KDE?

Offline

#13 2020-06-06 04:56:38

seth
Member
Registered: 2012-09-03
Posts: 58,399

Re: Problem displaying braille characters in gotop in Konsole

How did you install archlinux?

Online

#14 2020-06-06 04:57:19

tedd
Member
Registered: 2013-02-21
Posts: 26

Re: Problem displaying braille characters in gotop in Konsole

Using the installation guide wiki page and an Arch Linux ISO.

Offline

#15 2020-06-06 05:13:07

seth
Member
Registered: 2012-09-03
Posts: 58,399

Re: Problem displaying braille characters in gotop in Konsole

Then you should be able to answer to most questions of post #12 and aware that you are the only person able to answer them.
FreeMono is part of https://www.archlinux.org/packages/extr … ree-fonts/ and nobody else knows why you installed it but not on every system or whether you altered the fontconfig to raise it - this

Font configuration is detailed here: https://wiki.archlinux.org/index.php/Font_configuration you might want to look at the examples.
I'll re-stress that raising a variable width font in a fixed width list is a questionable move. (It's not "wrong" but it's not "correct" either - I assume FreeMono could be declared buggy in annoucing a glyph that it does't really provide (or resolves incorrectly)

Online

#16 2020-06-06 06:17:15

tedd
Member
Registered: 2013-02-21
Posts: 26

Re: Problem displaying braille characters in gotop in Konsole

I fail to see how the installation guide is of any help, unless you reply to everyone who asks a question that because they managed to install Arch, they're able to troubleshoot any issue they may have without asking for help.

The installation guide makes no mention of gui fonts, only console.

"Purging" a package is not a thing in Arch. A quick search of the wiki has only reference to Perl, Mariadb, and a bunch of other pages in other languages. I know Debian packages can be purged, but not Arch. Regardless, if you extended your rudely terse sentence to "Purge FreeMono package" I might've been a little more equipped to find the result on my own, but unlike you, I don't expect everyone to have an intimate knowledge of the entire system, nor any slang someone might use, so I try to be as clear as possible in questions and answers, and welcome clarification and guidance. My day job requires clear instruction and communication for safety, but wouldn't you agree it's good practice elsewhere?

From looking at my pacman.log, gnu-free-fonts package was installed as a replacement for ttf-freefont in July last year during a 'pacman -Syu'. I installed ttf-freefont as it was among a list of monospaced fonts in the wiki's Fonts page. Hack, by the way, is the default for new KDE Plasma installs, being a dependency of plasma-integration, so if you're against using it in Konsole, maybe you should consider filing a bug with KDE.

I repeat, that I've made no conscious changes to font configuration, because I've never had a need to dive into it. Maybe some program has done something for me, but not to my knowledge. I've only installed font packages from the repository. That's not illegal, is it? Does that mean I'm not allowed to ask for help?

Even if I did know exactly how font substitution worked, how was I supposed to know that FreeMono would be preferable to others in DejaVu's own family? Why would the existence of a font package change configuration in this way? Why do the bold and italic forms of DejaVu Sans Mono show braille? I don't know because I've never had to diagnose font problems before.

I acknowledge your repeated stressing about substituting fixed-width with variable-width is not a good thing, but I am not trying to do that! I just want the defaults to work.

Offline

#17 2020-06-06 06:38:44

seth
Member
Registered: 2012-09-03
Posts: 58,399

Re: Problem displaying braille characters in gotop in Konsole

It's not that the installation guide is of any "help" - it's that if you installed arch yourself, the package didn't end up magically on your system.

"purge" maybe not a thing in arch, but in the english laguange: https://www.merriam-webster.com/dictionary/purge
It's not a pacman keyword, but pacman has no keywords.

And to be real: I don't reqire intimate knowledge of anything, package installation and removal is pretty much as basic as it gets, anyway: https://wiki.archlinux.org/index.php/Pa … g_packages

if you're against using it in Konsole

I'm not against using any font anywhere (though would consider workspaces depending on particular font choices patronizing) and we figured that it's actually not Hack, but FreeMono that out of the blue got in the way.

I installed ttf-freefont as it was among a list of monospaced fonts

And here's the key question: On both installations?

how was I supposed to know that FreeMono would be preferable to others in DejaVu's own family

You're not. That's why we ran the pango-view debug and I told you that it was getting in the way. I hope that answers your other "I'm beingunfairly attacked" questions.
You're not. You're expected to know what is installed on your system and why, in particular if a package is not a hard dependency for anything. Because if you don't know, we certainly won't either.

The bold variants of FreeMono don't provide the braille characters and I checked FreeMono - it's not actually broken, the glyphs just really look like that (with empty and filled circles in a fixed square grid)

Online

#18 2020-06-06 09:08:26

tedd
Member
Registered: 2013-02-21
Posts: 26

Re: Problem displaying braille characters in gotop in Konsole

Thank you, I know 'purge' is in the dictionary, but using purge in this context was ambiguous and confusing. Purging some sort of cache like the font cache was the first thing I thought you were trying to say. I've rarely if ever seen 'purge' used as a reference to removing packages, other than in Debian, where it's still different from removal. How about just 'remove freemono package' to be unambiguous while still keeping your character count down?

While we're at it, why not just assume at this time that I know I'm supposed to know what's installed on my machine and the reason? It's irrelevant until I ask why gnu-free-fonts was installed. My question has nothing to do with why packages are installed. My question is how to fix configuration so the correct font displays.

This one-sentence back-and-forth is just wasting both our time. This is not IRC.

Finally, after that irrelevant sideshow, you mention font configuration, but don't explain why a completely different font would take preference over one in the same family, but only for some styles.

OK, so gnu-free-fonts was not installed on the virtual machine. I was wrong to make that unilateral statement above. After installing it, braille characters no longer show properly, or, like you said: empty and filled circles. I've still changed no configuration. Is this expected behaviour? Looking at https://www.gnu.org/software/freefont/r … aille.html looks different, so is this a presentation bug somewhere between freemono and konsole/xfce4-terminal?

Package installation and removal is basic, indeed. But what about diagnosing font problems (especially when it comes to higher-order unicode)? If freemono is substituted instead of something else from dejavu, is that a bug? Are my options just remove the package and shut up or change my configuration and shut up, or can I try to find the root cause and help fix the problem for anyone else who might want to have gnu-free-fonts and dejavu?

Variable-width fonts are indeed not great in a terminal emulator, but it looks like braille patterns are at least the same width as each other within a font face. They don't look any different switching between bold and/or italic. Could that be an exception in configuration somewhere? If it's not a bug in konsole, font-config, gotop/vtop or freemono, it could be a paragraph in the wiki somewhere, or at least here, documented, for future users.

I don't feel 'beingunfairly attacked', however I feel you're being unnecesarily dismissive, condescending and rude. If you don't want to help, why are you replying?

Last edited by tedd (2020-06-06 09:24:47)

Offline

#19 2020-06-06 09:35:00

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: Problem displaying braille characters in gotop in Konsole

tedd wrote:

[...] After installing it, braille characters no longer show properly, or, like you said: empty and filled circles. I've still changed no configuration. Is this expected behaviour? [...]

You originally didn't have any font with Braille characters installed. That's what those rectangular boxes were about. The rectangles mean that the system couldn't find a font to display those characters.

Then when you installed a font that contained Braille characters, the text suddenly started getting displayed correctly. That doesn't need any configuration, it happens by itself.

The way text rendering works is, the system puts all your fonts into a list. It uses that list to search for missing characters in the first font.

You can check on that list using "fc-match -s", like this:

$ fc-match -s dejavusansmono
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"
DejaVuSansMono-Oblique.ttf: "DejaVu Sans Mono" "Oblique"
LiberationMono-Regular.ttf: "Liberation Mono" "Regular"
DroidSans.ttf: "Droid Sans" "Regular"
DroidSansArmenian.ttf: "Droid Sans" "Regular"
DroidSansGeorgian.ttf: "Droid Sans" "Regular"
...

This output here is for "DejaVu Sans Mono" on my system, it shows how the system would try to find missing characters in DejaVu Sans Mono.

Offline

#20 2020-06-06 09:49:59

tedd
Member
Registered: 2013-02-21
Posts: 26

Re: Problem displaying braille characters in gotop in Konsole

No. Those boxes aren't the 'glyph missing' boxes. The virtual machine was running fine - displaying braille for the graph - until I installed ttf-freemono. Braille also appeared if I was using an italic or bold variant of dejavu sans mono with ttf-freemono not present.

The problem appears to be: If ttf-freemono is substituted in when installed, as seems to be the case, the braille glyphs are not being displayed correctly, by comparison with the freemono web page example sheet.

Try to zoom in on the image I posted above. The braille's there, it just looks 'weird'.

Last edited by tedd (2020-06-06 09:51:11)

Offline

#21 2020-06-06 10:49:35

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: Problem displaying braille characters in gotop in Konsole

I don't know why the font gets rendered totally broken.

About why it's starting to get used instead of better looking fonts, the sorting order of "fc-match -s" is a bit random. When you install a font, it can end up in a spot you don't like in the list. You can manually override the sorting order if you want to. Here's the file I use to tweak the problem for my preferred terminal and text editor font:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>

  <!-- Font fallbacks for Fantasque Sans Mono -->
  <alias>
    <family>Fantasque Sans Mono</family>
    <prefer>
      <family>Fantasque Sans Mono</family>
      <family>Iosevka Term</family>
      <family>DejaVu Sans Mono</family>
      <!-- <family>M+ 2m</family> -->
      <family>Droid Sans Fallback</family>
    </prefer>
  </alias>

</fontconfig>

I also have a larger file where you can see experiments where I tried to fix my problems with the generic "serif", "sans-serif", "monospace" names:

http://ix.io/2opj

I save it as "51-font-alias.conf" in /etc/fonts/conf.d.

I wrote that the sorting is "random" but it's of course not random. It's just that there's many files in /etc/fonts/conf.d/ that influence the order and you cannot easily know why a font ends up in a certain spot in the "fc-match -s" list.

Offline

#22 2020-06-06 11:38:58

seth
Member
Registered: 2012-09-03
Posts: 58,399

Re: Problem displaying braille characters in gotop in Konsole

The glyphs in https://www.gnu.org/software/freefont/r … aille.html are rendered by the browser resolved page.
You can inspect the font file FreeMono.otf eg. using fontforge.

@Ropid, it's actually not "totally broken" but rather a somewhat questionable artistic choice.
As for the resolution, the outputs in #8 show that the failure in DVSM will lead to the generic "monospace" resolution and at the end of that, FreeMono is a monospace font that does provide the desired glyphs.

In general it's reasonable to prefer "some monospace" resolution over a "resolve from the same family" strategy.
VTEs are and console output in general is designed towards fixed width fonts (to maintain a proper column layout) and *all* VTEs stumble over variable width fonts (some more, some less, some badly - but there just is no way to handle variable width fonts "right" in this context), so it makes *much* more sense to pick another monospace font. The system doesn't know that the particular glyph you look for was sketched with - subjectively - questionable taste.
To a lesser degree this also holds for resolving a sans serif ("grotesque") font rather than a serif font from the same family (because serif glyphs in a grotesque setup look much more strange and out of place than a maybe different but still grotesque font)

Some terminal emulators allow you to bypass the global fontconfig resolution - urxvt is very "unique" in this regard anyway and iirc kitty allows you to pick specific fonts for specific codepoint ranges (to deal with exactly this kind of conflict in a personalized way - or just because of the powerbar stuff ;-)

Online

Board footer

Powered by FluxBB