2

Most fonts (not all interestingly) are too small to be readable in gitk (yes, this is a 1:1 screenshot):

enter image description here


Update:

I seem the issue temporarily fixed by deleting my ~/.kde folder. But after opening/closing some applications, the issue has reappeared. I am unaware of doing anything relating to fonts. I have also realised that the issue appears to affect multiple X11 appliactions. I tested with xterm and urxvt.

I have noticed that disabpling TrueType fonts in xterm solves the issue. So now I think this is more closely related to X11, rather than gtk.

xterm will load a default font, if the one specified in ~/.Xresources is not found. urxvt will instead bail out with the message urxvt: unable to load base fontset, please specify a valid one using -fn, aborting. So, being able to run urxvt tells me that is finds the font. But it is rendered as tiny pixels as displayed above :(


I followed suggestions of another question (and some other solutions found via Google), but none of the proposed solutions worked.

  • gitg does not have the necessary features for filtering commits.
  • update-alternatives for wish says: update-alternatives: error: no alternatives for wish
  • modifying the font settings in either ~/.gitk or ~/.config/git/gitk does nothing.

I've also tried tig to get what I want, but nothing really works as well as gitk and I'd love to get it working again.

Note: This happened after a blank reinstall of Ubuntu. Not sure what went wrong and where.

My wild guess is that it cannot find the default fonts. So I reinstalled tk but that did not help either.

1
  • @Jay: Are you sure you mean xming? That's an X11 server for Windows as far as I know. – exhuma Sep 7 '15 at 9:13
3

The solution to this problem was fixing an incorrect DPI value. For some reason it was not properly detected:

› xdpyinfo | grep dots
resolution:    -2147483648x-2147483648 dots per inch

This caused some fonts to be rendered incorrectly. Calculating the proper DPI value for the screen, and setting it manually fixed the problem. There probably are GUIs to set this (in KDE it's in the font settings). It can also be set on the console via xrandr:

› xrandr --dpi 100x100

nb: The information came from this reddit thread.

1
  • Thanks for posting this. This issue has driven me crazy at some point every time I've tried to switch to desktop Linux, and I think I finally understand the solution now :-) – sjy Sep 4 '19 at 13:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.