git-guigitk

Regular fonts for git-gui and gitk have disappeared


I'm on Ubuntu 16.04. Recently, the fonts in my git-gui and gitk have suddenly changed. I have tried the other fonts proposed but none of them correspond to the previous one that I was used to.

This is what it looked before the bug (taken from the web) :

enter image description here enter image description here

This is what it looks like now :

enter image description here enter image description here

The current fonts for git gui are :

The current fonts for gitk are :

The fonts I can choose from are :

bitstream charter, clean, clearlyu alternate glyphs, clearlyu arabic, clearlyu arabic extra, clearlyu devanagari, clearlyu devangari extra, clearlyu pua, courrier 10 pitch, fangsong ti, fixed, gothic, mincho, newspaper, nil, open look cursor, open look glyph, song ti

Can someone check what is the normal default font for git-gui and gitk on Ubuntu 16.04, and maybe explain why they have changed in my case ? Maybe I incidentally removed a package...

I tried to reinstall gitk and git gui, but I still get that font... The difference is that at the beginning, the default fonts in gitk are Helvetica, Courier and Helvetica, and when I click on the button to choose the font, they don't appear in the list. Could that be a Tcl/Tk problem ?


Solution

  • UPDATE

    I finally figured out where this is coming from, and it's because of the Anaconda environment.

    git-gui and gitk use Tcl/Tk and tkinter as a GUI library, and as mentionned in this answer:

    tkinter works linking to a Tk/Tcl interpreter that, loosely speaking, is contained in a couple of DLL, in particular the graphical library is libtk6.0.so.

    Most of the extra fonts not seen by tkinter are managed by the Freetype library and Anaconda's libtk6.0.so is not built against Freetype...

    I have made the test, and I can conclude that it is very well coming from this :

    $ conda deactivate
    $ gitk                 # fonts are okay
    $ conda activate base
    $ (base) gitk          # fonts are weird
    $ (base) conda deactivate
    $ gitk                 # fonts are okay again
    

    One workaround is the one mentionned here:

    I resolved this issue by removing wish files in ANACONDA_PATH/bin and related virtual environments

    Except that I renamed the files instead of removing them, e.g. wish -> wish-i-renamed-it.

    Sources :

    Make Anaconda's tkinter aware of system fonts or install new fonts for Anaconda

    https://github.com/ContinuumIO/anaconda-issues/issues/6833


    This old answer doesn't apply anymore

    I just restarted my computer this morning, and the fonts are back ! They are all here ! I really don't know why though...

    Here is my update log :

    $ less /var/log/apt/history.log
    
    Start-Date: 2018-06-05  09:36:17
    Commandline: aptdaemon role='role-commit-packages' sender=':1.127'
    Upgrade: liblouis9:amd64 (2.6.4-2ubuntu0.1, 2.6.4-2ubuntu0.2), snapd:amd64 (2.32.3.2, 2.32.9), python3-louis:amd64 (2.6.4-2ubuntu0.1, 2.6.4-2ubuntu0.2), libexempi3:amd64 (2.2.2-2, 2.2.2-2ubuntu0.1), liblouis-data:amd64 (2.6.4-2ubuntu0.1, 2.6.4-2ubuntu0.2)
    End-Date: 2018-06-05  09:36:36
    
    Start-Date: 2018-06-06  08:31:53
    Commandline: aptdaemon role='role-commit-packages' sender=':1.100'
    Upgrade: libelf1:amd64 (0.165-3ubuntu1, 0.165-3ubuntu1.1), libelf1:i386 (0.165-3ubuntu1, 0.165-3ubuntu1.1)
    End-Date: 2018-06-06  08:31:57
    
    Start-Date: 2018-06-06  08:32:51
    Commandline: aptdaemon role='role-commit-packages' sender=':1.100'
    Upgrade: git-gui:amd64 (1:2.7.4-0ubuntu1.3, 1:2.7.4-0ubuntu1.4), git-man:amd64 (1:2.7.4-0ubuntu1.3, 1:2.7.4-0ubuntu1.4), git:amd64 (1:2.7.4-0ubuntu1.3, 1:2.7.4-0ubuntu1.4), gitk:amd64 (1:2.7.4-0ubuntu1.3, 1:2.7.4-0ubuntu1.4)
    End-Date: 2018-06-06  08:33:03
    
    Start-Date: 2018-06-07  10:39:47
    Commandline: aptdaemon role='role-commit-packages' sender=':1.124'
    Upgrade: liblouis9:amd64 (2.6.4-2ubuntu0.2, 2.6.4-2ubuntu0.3), google-chrome-stable:amd64 (67.0.3396.62-1, 67.0.3396.79-1), python3-louis:amd64 (2.6.4-2ubuntu0.2, 2.6.4-2ubuntu0.3), liblouis-data:amd64 (2.6.4-2ubuntu0.2, 2.6.4-2ubuntu0.3)
    End-Date: 2018-06-07  10:40:04
    
    Start-Date: 2018-06-13  08:46:19
    Commandline: aptdaemon role='role-commit-packages' sender=':1.107'
    Install: linux-headers-4.4.0-128:amd64 (4.4.0-128.154, automatic), linux-headers-4.4.0-128-generic:amd64 (4.4.0-128.154, automatic), linux-image-4.4.0-128-generic:amd64 (4.4.0-128.154, automatic), linux-signed-image-4.4.0-128-generic:amd64 (4.4.0-128.154, automatic), linux-image-extra-4.4.0-128-generic:amd64 (4.4.0-128.154, automatic)
    Upgrade: libimage-magick-perl:amd64 (8:6.8.9.9-7ubuntu5.9, 8:6.8.9.9-7ubuntu5.11), linux-headers-generic:amd64 (4.4.0.127.133, 4.4.0.128.134), linux-libc-dev:amd64 (4.4.0-127.153, 4.4.0-128.154), libldap-2.4-2:amd64 (2.4.42+dfsg-2ubuntu3.2, 2.4.42+dfsg-2ubuntu3.3), libldap-2.4-2:i386 (2.4.42+dfsg-2ubuntu3.2, 2.4.42+dfsg-2ubuntu3.3), libimage-magick-q16-perl:amd64 (8:6.8.9.9-7ubuntu5.9, 8:6.8.9.9-7ubuntu5.11), imagemagick:amd64 (8:6.8.9.9-7ubuntu5.9, 8:6.8.9.9-7ubuntu5.11), adobe-flash-properties-gtk:amd64 (1:20180508.1-0ubuntu0.16.04.1, 1:20180607.1-0ubuntu0.16.04.1), linux-image-generic:amd64 (4.4.0.127.133, 4.4.0.128.134), libmagickwand-6.q16-2:amd64 (8:6.8.9.9-7ubuntu5.9, 8:6.8.9.9-7ubuntu5.11), linux-signed-image-generic:amd64 (4.4.0.127.133, 4.4.0.128.134), slack-desktop:amd64 (3.2.0-beta25a7a50e, 3.2.1), google-chrome-stable:amd64 (67.0.3396.79-1, 67.0.3396.87-1), linux-signed-generic:amd64 (4.4.0.127.133, 4.4.0.128.134), adobe-flashplugin:amd64 (1:20180508.1-0ubuntu0.16.04.1, 1:20180607.1-0ubuntu0.16.04.1), imagemagick-6.q16:amd64 (8:6.8.9.9-7ubuntu5.9, 8:6.8.9.9-7ubuntu5.11), libmagickcore-6.q16-2-extra:amd64 (8:6.8.9.9-7ubuntu5.9, 8:6.8.9.9-7ubuntu5.11), firefox-locale-en:amd64 (60.0.1+build2-0ubuntu0.16.04.1, 60.0.2+build1-0ubuntu0.16.04.1), firefox-locale-fr:amd64 (60.0.1+build2-0ubuntu0.16.04.1, 60.0.2+build1-0ubuntu0.16.04.1), gpgv:amd64 (1.4.20-1ubuntu3.1, 1.4.20-1ubuntu3.2), libmagickcore-6.q16-2:amd64 (8:6.8.9.9-7ubuntu5.9, 8:6.8.9.9-7ubuntu5.11), firefox:amd64 (60.0.1+build2-0ubuntu0.16.04.1, 60.0.2+build1-0ubuntu0.16.04.1), imagemagick-common:amd64 (8:6.8.9.9-7ubuntu5.9, 8:6.8.9.9-7ubuntu5.11), libmagick++-6.q16-5v5:amd64 (8:6.8.9.9-7ubuntu5.9, 8:6.8.9.9-7ubuntu5.11), gnupg:amd64 (1.4.20-1ubuntu3.1, 1.4.20-1ubuntu3.2), linux-generic:amd64 (4.4.0.127.133, 4.4.0.128.134), spotify-client:amd64 (1:1.0.77.338.g758ebd78-41, 1:1.0.80.480.g51b03ac3-13)
    End-Date: 2018-06-13  08:49:26
    
    Start-Date: 2018-06-14  15:36:26
    Commandline: aptdaemon role='role-commit-packages' sender=':1.128'
    Upgrade: perl-base:amd64 (5.22.1-9ubuntu0.3, 5.22.1-9ubuntu0.5), perl-modules-5.22:amd64 (5.22.1-9ubuntu0.3, 5.22.1-9ubuntu0.5), console-setup-linux:amd64 (1.108ubuntu15.3, 1.108ubuntu15.4), console-setup:amd64 (1.108ubuntu15.3, 1.108ubuntu15.4), libperl5.22:amd64 (5.22.1-9ubuntu0.3, 5.22.1-9ubuntu0.5), keyboard-configuration:amd64 (1.108ubuntu15.3, 1.108ubuntu15.4), perl:amd64 (5.22.1-9ubuntu0.3, 5.22.1-9ubuntu0.5)
    End-Date: 2018-06-14  15:37:04
    
    Start-Date: 2018-06-15  10:36:50
    Commandline: aptdaemon role='role-commit-packages' sender=':1.152'
    Upgrade: gnupg-agent:amd64 (2.1.11-6ubuntu2, 2.1.11-6ubuntu2.1), ruby2.3:amd64 (2.3.1-2~16.04.9, 2.3.1-2~16.04.10), libmagic1:amd64 (1:5.25-2ubuntu1, 1:5.25-2ubuntu1.1), ruby2.3-dev:amd64 (2.3.1-2~16.04.9, 2.3.1-2~16.04.10), dirmngr:amd64 (2.1.11-6ubuntu2, 2.1.11-6ubuntu2.1), libruby2.3:amd64 (2.3.1-2~16.04.9, 2.3.1-2~16.04.10), gnupg2:amd64 (2.1.11-6ubuntu2, 2.1.11-6ubuntu2.1), file:amd64 (1:5.25-2ubuntu1, 1:5.25-2ubuntu1.1)
    End-Date: 2018-06-15  10:37:08
    
    Start-Date: 2018-06-19  09:04:17
    Commandline: aptdaemon role='role-commit-packages' sender=':1.168'
    Upgrade: libwebkit2gtk-4.0-37:amd64 (2.20.2-0ubuntu0.16.04.1, 2.20.3-0ubuntu0.16.04.1), gir1.2-webkit2-4.0:amd64 (2.20.2-0ubuntu0.16.04.1, 2.20.3-0ubuntu0.16.04.1), desktop-file-utils:amd64 (0.22-1ubuntu5.1, 0.22-1ubuntu5.2), libjavascriptcoregtk-4.0-18:amd64 (2.20.2-0ubuntu0.16.04.1, 2.20.3-0ubuntu0.16.04.1), wireless-regdb:amd64 (2015.07.20-1ubuntu1, 2018.05.09-0ubuntu1~16.04.1), libwebkit2gtk-4.0-37-gtk2:amd64 (2.20.2-0ubuntu0.16.04.1, 2.20.3-0ubuntu0.16.04.1), gir1.2-javascriptcoregtk-4.0:amd64 (2.20.2-0ubuntu0.16.04.1, 2.20.3-0ubuntu0.16.04.1)
    End-Date: 2018-06-19  09:04:32
    
    Start-Date: 2018-06-20  10:39:10
    Commandline: aptdaemon role='role-commit-packages' sender=':1.182'
    Upgrade: libgcrypt20:amd64 (1.6.5-2ubuntu0.4, 1.6.5-2ubuntu0.5), libgcrypt20:i386 (1.6.5-2ubuntu0.4, 1.6.5-2ubuntu0.5)
    End-Date: 2018-06-20  10:39:15
    
    Start-Date: 2018-06-21  16:30:24
    Commandline: aptdaemon role='role-commit-packages' sender=':1.214'
    Upgrade: amd64-microcode:amd64 (2.20160316.1, 3.20180524.1~ubuntu0.16.04.1)
    End-Date: 2018-06-21  16:30:48
    

    And this is my reboot log :

    $ last -x | grep reboot
    
    reboot   system boot  4.4.0-128-generi Tue Jun 26 09:08   still running
    reboot   system boot  4.4.0-128-generi Fri Jun 15 10:38 - 18:33 (10+07:55)
    reboot   system boot  4.4.0-127-generi Tue Jun 12 09:26 - 18:33 (13+09:06)
    reboot   system boot  4.4.0-127-generi Tue Jun 12 09:21 - 09:25  (00:03)
    reboot   system boot  4.4.0-127-generi Tue Jun  5 16:43 - 09:20 (6+16:37)
    reboot   system boot  4.4.0-127-generi Mon Jun  4 12:54 - 09:20 (7+20:26)
    

    The only way I could see why is the fact that I upgraded git-gui and gitk on June 6th. But why did only work when rebooting on the 26th ? There is no Tcl/Tk upgrade, but there are gtk upgrades, so I don't know if that has something to do with it... Maybe someone can figure it out ?