Bug 1244729 - Unreadable fonts on git gui
Summary: Unreadable fonts on git gui
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: tk
Version: 31
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jaroslav Škarvada
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-20 11:43 UTC by Shnoulle
Modified: 2020-02-02 03:42 UTC (History)
10 users (show)

Fixed In Version: tk-8.6.8-2.fc31
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-01-13 11:41:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Actual result (29.26 KB, image/png)
2015-07-20 11:43 UTC, Shnoulle
no flags Details
screen shot of About Git Gui dialog (7.73 KB, image/png)
2019-12-18 02:55 UTC, Brad Bell
no flags Details
Before tk update (38.46 KB, image/png)
2020-01-16 06:25 UTC, Eric Work
no flags Details
After tk update (40.66 KB, image/png)
2020-01-16 06:25 UTC, Eric Work
no flags Details

Description Shnoulle 2015-07-20 11:43:11 UTC
Created attachment 1053843 [details]
Actual result

Description of problem:
Fonts used in git gui are unreadable (too small)

Version-Release number of selected component (if applicable):
Fedora 12
git version 2.4.3

How reproducible:
Always (with my configuration)

Steps to Reproduce:
1. Clone any repo with git
2. Go to directory 
3. Launch git gui

Actual results:
Fonts used for menu, diff and editor seems to be 3/4 px wide, even with 

Expected results:
Font like other apps

Additional info:
Updated via fedup from a 21

Comment 1 Petr Stodulka 2015-07-21 19:47:27 UTC
Hi,
on clean new installation I can't reproduce it and everything is ok with big nice characters.

Have you upgraded all packages correctly? Isn't there some old one? Tested on x86_64 architecture. In my point of view that's probably not bug inside git-gui. The most probably is mistake caused due to some mistake during upgrade. Everthing else is OK? Try reinstall git* packages (yes that's desparate experiment). Can you check list of installed packages if there is some package which isn't available in F22 repository?

Comment 2 Petr Stodulka 2015-07-22 08:36:20 UTC
Note: tested on i686 as well

Comment 3 Shnoulle 2015-07-22 10:20:27 UTC
Hi,

Thanks to test in can reproduce ....

For update, 
Doing it by fedup :
fedup --network 22 and distro-sync after.

# dnf list installed git*
Last metadata expiration check performed 0:13:10 ago on Wed Jul 22 08:32:16 2015.
Paquets installés
Paquets installés
GitPython.noarch    1.0.1-1.fc22    @System
git.i686            2.4.3-4.fc22    @System
git-gui.noarch      2.4.3-4.fc22    @System
gitg.i686           3.16.1-1.fc22   @System
gitg-libs.i686      3.16.1-1.fc22   @System
gitk.noarch         2.4.3-4.fc22    @System

(din't have gitg and gitk before update, instaling to do some git commit :) ).
Reinstall git+git-gui : no change (dnf reinstall git git-gui)
Test with a new user : no change

Surely some issue with a default font somewhere ... but seems to be only in git-gui ? No specific preferences for git-gui ?

Comment 4 Petr Stodulka 2015-07-22 11:56:59 UTC
I tried upgrade with fedup from F21 to F22, but I can't finish upgrade, so I can't reproduce it in this way.

Maybe it's stupid question, but what is your settings of fonts inside git-gui? If there is set big enough, you should probably check if font really exists and is installed correctly. Or set some else font.

Comment 5 Shnoulle 2015-07-22 12:09:58 UTC
Really not stupid ... but problem is : i don't remind what is the font before update, remind it was set to 12 but ... name. And i can't update config without font ....

For terminable accessible config
$ git config -l --system
fatal: unable to read config file '/etc/gitconfig': Aucun fichier ou dossier de ce type

$ git config -l
core.editor=vim
core.excludesfile=/home/shnoulle/.gitignore
core.autocrlf=input
giggle.main-window-maximized=false
giggle.main-window-geometry=1202x645+1+74
giggle.history-view-vpane-position=329
giggle.file-view-vpane-position=334
giggle.main-window-view=HistoryView
user.name=Denis Chenu
user.email=myemail
gui.recentrepo=/home/shnoulle/Développements/GIT/Shnoulle/test
push.default=simple


Do you have an /etc/gitconfig with a new install ?
Where is the git-gui config ?????

Comment 6 Shnoulle 2015-07-22 12:14:51 UTC
(In reply to Shnoulle from comment #5)
> Do you have an /etc/gitconfig with a new install ?
> Where is the git-gui config ?????

http://repo.or.cz/w/git-gui.git/blob/HEAD:/lib/option.tcl#l32

Comment 7 Heldwin 2015-07-23 09:37:22 UTC
I can reproduce it on F22, where I never had git-gui installed.
But I get a big font size by default.

It seems that I have a DejaVu Sans/DejaVue Sans Mono, of size 0pt by default (it does it too when I select 9 pt), It does it all the time.

If I select an other font size, it is ok.
If I set the size to 10, and modify my .gitconfig to set 9 manually, it is ok.
If I set the font size to 9 in the gui, the font config goes back to 0 pt if I select 9 for the font size.

Comment 8 Shnoulle 2015-07-23 09:43:22 UTC
Fixed forcing fonts in ~/.gitconfig
[gui]
	fontui = -family \"Liberation Sans\" -size 12 -weight normal -slant roman -underline 0 -overstrike 0
	fontdiff = -family \"Liberation Mono\" -size 10 -weight normal -slant roman -underline 0 -overstrike 0

Then :
- I have a problem with my default font (TkDefault ?)
- I have Courier but ?

Comment 9 Heldwin 2015-07-23 09:51:30 UTC
I am on x86_64 so it is not specific to i686

Comment 10 Petr Stodulka 2015-07-23 10:01:43 UTC
Shoulle: your global config should be inside your home directory ~/.gitconfig and it's created by git when you set some global atribut - e.g.: user.name.
File /etc/gitconfig must be created manually I think.

Thanks Heldwin for info. You are right about this behaviour. It's little wierd (and for size 8 it's 8 again).

Comment 11 Petr Stodulka 2015-07-23 10:11:49 UTC
Courier it's not part of available fonts in my git-gui  - but maybe some fonts are missing in system and could be installed. You can check if you have this font installed on your system. When this can be solved in this way, I propose close this as notabug or wontfix - in case that Courier is available option inside settings.

If you think that it should be fixed and font should be changed automatically in this case, feel free to reopen.

Comment 12 Heldwin 2015-07-23 10:32:06 UTC
I am not sure how this file is used, but in source code, there is a git-gui.sh file, with this:

## config defaults

set cursor_ptr arrow
font create font_ui
if {[lsearch -exact [font names] TkDefaultFont] != -1} {
        eval [linsert [font actual TkDefaultFont] 0 font configure font_ui]
        eval [linsert [font actual TkFixedFont] 0 font create font_diff]
} else {
        font create font_diff -family Courier -size 10
        catch {
                label .dummy
                eval font configure font_ui [font actual [.dummy cget -font]]
                destroy .dummy
        }
}

If I understand it correctly, it will try to use a Courier 10 by default, sometimes.
(on my system I don't have "Courier", but "Courier 10 Pitch")

Comment 13 Petr Stodulka 2015-07-23 11:00:46 UTC
You are right. I don't have even any courier font installed by default. May there could be set some another font.

Comment 14 Shnoulle 2015-07-23 11:42:41 UTC
@pstodulk : my workstation start update since 18 or maybe before ....

OK to close it since i'm the only one to have the issue :).

For courier:
- I have courier font
For TkDefaultFont (can be set somewhere ?)
- Deja Vu : installed : dejavu-fonts-common/dejavu-sans-fonts/dejavu-sans-mono-fonts/dejavu-serif-fonts/php-tcpdf-dejavu-sans-fonts
- BUT : have 3 Deja Vu Sans in dropdown ... something here. Seems not directly linked with git-gui.

Comment 15 Eric Work 2018-12-07 03:30:56 UTC
This bug is still there in Fedora 29.  It may have been there for many releases, but I guess I haven't launched git gui in a while (since I got my 4k monitor).  On HiDPI systems you get tiny fonts for everything except the menu and fixed width content.  I came across this particular bug because I was looking at the gui-gui tcl script and noticed the same block of code as @Arnaud.  I only have "Courier 10 Pitch" as well.  I'm not sure how to set TkDefaultFont but I guess that is my next step.

Comment 16 Eric Work 2018-12-07 05:51:30 UTC
I believe this is really both a tk and a git-gui bug.  tk is not setting the font size right by default and git-gui is not applying the UI font properly to widgets.

For the tk issue I created the following bug:

https://core.tcl-lang.org/tk/tktview/dccd82bdc70dc25bb6709a6c14880a92104dda43

I provided a workaround on there to set the default ttk font size, and font family as well if desired.

When I modify the "Current Branch:" label and add a "-font font_ui" parameter it looks the same as the menus, which is probably what is expected.  I've never programmed in TCL/TK before so I have no idea how to fix it properly.

Comment 17 Eric Work 2018-12-07 06:08:40 UTC
Emailed the git-scm mailing list for comments on the git-gui issue regarding not setting the widget font properly.

Comment 18 Todd Zullinger 2018-12-10 00:12:06 UTC
Thanks for pushing this upstream (both with git and tcl/tk) Eric!  With the workaround you mentioned in the tcl/tk bug report, does git-gui behave reasonably?  If so, should we move this bug to the tcl/tk component?

I don't know that any of the git maintainers in Fedora spend much time using git-gui or gitk (I certainly don't).  Upstream, both projects seem to be barely maintained.

Comment 19 Eric Work 2018-12-10 23:09:29 UTC
Yes with the "overriding" of the font size it looks normal.  I reduced the fonts to be the same point size as the GNOME shell default font size so it looks more correct.  It might not be a bad idea to have this patched in the tcl/tk package so others with HiDPI screens see it work as expected.  I haven't tried it on a non-hidpi screen since both my desktop and laptop have some font scale factor applied.

Comment 20 Todd Zullinger 2018-12-19 20:26:15 UTC
Alright, let's reassign this to tk and see if the tk maintainers have some thoughts on how to fix this more generally for tk apps.  (Or if they can tell this is something git-gui is doing incorrectly, of course.)

Comment 21 Ben Cotton 2019-10-31 19:17:24 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '29'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 29 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 22 Ben Cotton 2019-11-27 22:35:50 UTC
Fedora 29 changed to end-of-life (EOL) status on 2019-11-26. Fedora 29 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 23 Brad Bell 2019-12-18 02:55:21 UTC
Created attachment 1645988 [details]
screen shot of About Git Gui dialog

Comment 24 Brad Bell 2019-12-18 03:02:21 UTC
I am having trouble with the git-gui fonts in a virtualbox  Fedora-31 guest system / windows host;
see the attachment about_git_gui.png above.

Pictures>uname -a
Linux localhost.localdomain 5.3.7-301.fc31.x86_64 #1 SMP Mon Oct 21 19:18:58 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Pictures>dnf info git-gui | grep '^Source'
Source       : git-2.23.0-1.fc31.src.rpm


Virtual box install program
VirtualBox-6.0.14-133895-Win.exe

Comment 25 Brad Bell 2019-12-18 11:52:56 UTC
I should have mentioned that I have guest additions installed in the virtual box Fedora guest.

Comment 26 Eric Work 2020-01-09 07:25:42 UTC
I pinged on the previously mentioned tcl/tk bug and someone replied and mentioned that Debian/Ubuntu has already been carry this same change I made locally in their packages.  See https://sources.debian.org/patches/tk8.6/8.6.9-2/font-sizes.diff/.  Any chance we could get this patch applied to the Fedora package?

Comment 27 Eric Work 2020-01-09 07:30:35 UTC
FYI, I believe git-gui/gitk might have resolved this issue at some point, but looking at the history I'm not exactly sure when or 100% sure it was.  On a fresh Fedora 31 install it looks fine now (using default fonts).  Based on Brad's comment it might have been when git was updated to 2.24.0?  Although for other tk programs this would still be an issue, so it would be good to apply the above patch anyways.

Comment 28 Brad Bell 2020-01-10 21:54:51 UTC
The problem I am having is restricted to my virtual box version of fedora-31.
The fonts work fine on a native version of the system but not in the virtualbox version:

virtualbox version:
>uname -a
Linux localhost.localdomain 5.3.7-301.fc31.x86_64 #1 SMP Mon Oct 21 19:18:58 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

native version:
>uname -a
Linux localhost.localdomain 5.3.7-301.fc31.x86_64 #1 SMP Mon Oct 21 19:18:58 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

The version of git is 2.23.0 on both systems.


Perhaps this means it is a bug in virtualbox and not git gui.

Comment 29 Todd Zullinger 2020-01-10 22:02:03 UTC
I think the core issue is in tk, but you should update to the current git-gui-2.24.1 to test, as Eric mentioned in comment #27 the issue doesn't seem to appear there.

Comment 30 Todd Zullinger 2020-01-10 22:03:50 UTC
(In reply to Eric Work from comment #26)
> I pinged on the previously mentioned tcl/tk bug and someone replied and
> mentioned that Debian/Ubuntu has already been carry this same change I made
> locally in their packages.  See
> https://sources.debian.org/patches/tk8.6/8.6.9-2/font-sizes.diff/.  Any
> chance we could get this patch applied to the Fedora package?

Jaroslav, any thoughts on this?

Comment 31 Brad Bell 2020-01-10 22:56:41 UTC
I updated to git 2.24.1 and it did not fix the fonts in the virtualbox version of

Comment 32 Jaroslav Škarvada 2020-01-13 09:35:07 UTC
(In reply to Todd Zullinger from comment #30)
> (In reply to Eric Work from comment #26)
> > I pinged on the previously mentioned tcl/tk bug and someone replied and
> > mentioned that Debian/Ubuntu has already been carry this same change I made
> > locally in their packages.  See
> > https://sources.debian.org/patches/tk8.6/8.6.9-2/font-sizes.diff/.  Any
> > chance we could get this patch applied to the Fedora package?
> 
> Jaroslav, any thoughts on this?

Thanks, I will add this patch downstream. I didn't notice, because I don't have high DPI display :)

Comment 33 Jaroslav Škarvada 2020-01-13 11:41:17 UTC
I applied the patch in rawhide. Are you OK with the rawhide fix only?

Comment 34 Eric Work 2020-01-13 21:59:45 UTC
It would be nice to have the fix in Fedora 31 as well if possible.  I can pull just this package from rawhide if necessary.

Comment 35 Jaroslav Škarvada 2020-01-14 10:13:50 UTC
(In reply to Eric Work from comment #34)
> It would be nice to have the fix in Fedora 31 as well if possible.  I can
> pull just this package from rawhide if necessary.

NP, I will fix it.

Comment 37 Eric Work 2020-01-16 06:25:23 UTC
Created attachment 1652638 [details]
Before tk update

Comment 38 Eric Work 2020-01-16 06:25:49 UTC
Created attachment 1652639 [details]
After tk update

Comment 39 Eric Work 2020-01-16 06:29:57 UTC
As you can see from the screenshots I just attached, the font size has increased.  I'm using the default fonts for these screenshots.  You can compare the font size with the title bar to get an idea how large the font should be.  The difference would be more extreme if my font scaling was 2x instead of 1.5x.  I'd consider this fixed.

Comment 40 Fedora Update System 2020-01-16 19:51:01 UTC
tk-8.6.8-2.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-0437030c32

Comment 41 Mathias Nicolajsen Kjærgaard 2020-01-19 17:25:39 UTC
I just updated to tk-8.6.8-2.fc31, and it fixed the problem for me. Thanks!

Comment 42 Fedora Update System 2020-01-31 02:00:15 UTC
tk-8.6.8-2.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.

Comment 43 Brad Bell 2020-02-02 03:42:51 UTC
(In reply to Brad Bell from comment #24)
> I am having trouble with the git-gui fonts in a virtualbox  Fedora-31 guest
> system / windows host;
> see the attachment about_git_gui.png above.
> 
> Pictures>uname -a
> Linux localhost.localdomain 5.3.7-301.fc31.x86_64 #1 SMP Mon Oct 21 19:18:58
> UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
> 
> Pictures>dnf info git-gui | grep '^Source'
> Source       : git-2.23.0-1.fc31.src.rpm
> 
> 
> Virtual box install program
> VirtualBox-6.0.14-133895-Win.exe

This seems to be a problem with Virtualbox. I was able to fix it be selecting
the proper virtual machine and then
   Settings | Display | Enable 3D Acceleration
in the virtualbox manager program.


Note You need to log in before you can comment on or make changes to this bug.