我在Ubuntu 16.04上。 最近,我的git-gui和gitk中的字体突然改变了。 我已经尝试了其他提出的字体,但它们都没有与我以前使用过的字体相对应。
这是它在bug之前看到的内容(取自网络):
这就是现在的样子:
git gui的当前字体是:
gitk的当前字体是:
我可以选择的字体是:
比特流包机,清洁,清晰的替代字形,清晰阿拉伯语,清晰阿拉伯语额外,明确devanagari,明确devangari额外,clearu pua,courrier 10 pitch,fangsong ti,固定,哥特式,mincho,报纸,零,开放式光标,看看字形,歌曲有人可以检查Ubuntu 16.04上git-gui和gitk的正常默认字体是什么,也许可以解释为什么他们在我的情况下有所改变?也许我偶然删除了一个包...
我试图重新安装gitk和git gui,但我仍然得到那个字体......不同的是,在开始时,gitk中的默认字体是Helvetica,Courier和Helvetica,当我点击按钮选择字体,它们不会出现在列表中。 这可能是Tcl / Tk问题吗?
答案 0 :(得分:6)
更新
我终于弄清楚了它的来源,这是由于Anaconda环境造成的。
git-gui
和gitk
使用Tcl/Tk
和tkinter
作为GUI库,并提到in this answer:
tkinter
可以链接到Tk / Tcl解释器,该解释器松散地 讲,包含在几个DLL中,尤其是图形 库是libtk6.0.so
。
tkinter
看不到的大多数额外字体由 Freetype库和Anaconda的libtk6.0.so并非针对 自由类型...
我已经进行了测试,我可以得出结论,这很好:
$ conda deactivate
$ gitk # fonts are okay
$ conda activate base
$ (base) gitk # fonts are weird
$ (base) conda deactivate
$ gitk # fonts are okay again
一种解决方法是提到的here:
我通过删除ANACONDA_PATH / bin中的
wish
个文件来解决此问题, 相关的虚拟环境
除了我重命名文件,而不是删除它们(例如wish
-> wish-i-renamed-it
。
来源:
Make Anaconda's tkinter aware of system fonts or install new fonts for Anaconda
https://github.com/ContinuumIO/anaconda-issues/issues/6833
此旧答案不再适用
今天早上我刚刚重新启动计算机,字体又回来了! 他们都在这里! 我真的不知道为什么...
这是我的更新日志:
$ 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
这是我的重启日志:
$ 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)
我能看到原因的唯一途径是我在6月6日升级了git-gui和gitk的事实。 但是,为什么只在26号重启时才起作用? 没有Tcl / Tk升级,但是有gtk升级,所以我不知道这是否与之相关... 也许有人可以弄清楚吗?