Re: [PATCH] Fix default font scaling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On нд, чер 23 2024 at 13:11:22 +03:00:00, serg.partizan@xxxxxxxxx wrote:


On нд, чер 23 2024 at 11:13:53 +02:00:00, Johannes Sixt <j6t@xxxxxxxx> wrote:
Am 21.06.24 um 09:18 schrieb Serhii Tereshchenko:
Thanks! I tried booting into Fedora/37 with the same Tk version, and it
 indeed does not have this scaling problem.

Then, I downgraded packages on Arch to 8.6.12 and 8.6.13 - also no problem.

 The only version affected is 8.6.14.

That's probably a bug in Tk (and there's quite a few reported, mostly
 about "tk scaling" https://core.tcl-lang.org/tk/info/1de3a48312, we
don't use it explicitly in git-gui but on my system it is set to 1.3)

What is the best course of action now? Since this change does not make things any different for me on Linux+KDE, I am inclined to pick up this patch with a modified commit message and code comment that clearly state
that this is a work-around for a bug in Tk introduced in 8.6.14. This
would help users who upgrade from an earlier version of Tk, because it
does not look like a fix of Tk is in the works (or that the issue is
regarded as a regression by Tk people at all).

Suggestions?

-- Hannes

I tried running default git-gui and this patch on macOS 12 Monterey, and that version does not have font scaling, so there's no problem. I will ask around and maybe find someone with latest macOS, which has font scaling, and see if there's a problem.

Patch does not breaks anything, but produces a warning due to system fonts being present in 'font names'.

Then, if turns out this linux-specific problem - i'd limit this fix only to linux. If this affects other platforms - i'd filter fonts to only include those starting with 'Tk' prefix.

After more reasearch, I found this:

https://core.tcl-lang.org/tk/info/dccd82bdc7

This is x11-only bug, which existed for a long time and i'm suprized we're seeing it only in 8.6.14, because .13 and .12 are using the same negative sizes.

It is also fixed for a long time in the 8.7 branch and not backported into 8.6.

https://github.com/tcltk/tk/blob/7c3e2ff815e23cc6ac1ce9891ca659e709776ea4/library/ttk/fonts.tcl

Also, you may be not seeing this, because your distro may have applied this patch: https://sources.debian.org/patches/tk8.6/8.6.9-2/font-sizes.diff/

With this information, i'm more inclined to making a patch for ArchLinux package. So, it will fix every tk app, and not only git-gui.

What do you think?







[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux