public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: Serhii Tereshchenko <serg.partizan@gmail.com>
To: Johannes Sixt <j6t@kdbg.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Fix default font scaling
Date: Thu, 20 Jun 2024 21:11:47 +0300	[thread overview]
Message-ID: <N75EFS.1X38FZPYSV94@gmail.com> (raw)
In-Reply-To: <abee589d-5bad-4376-ba91-3bd611936983@kdbg.org>

Yeah, I'm also testing this way.

No, fonts should not be independent from DPI, but now some fonts are 
scaling just like the others.

To clearly see the result, set comfortable DPI, so fonts are reasonably 
sized (if this value is close to 96, better use something larger, like 
130 or 200 to see the effect).

When you run "git-gui" from the master branch, look at the fonts for:

- menubar and menu (explicitly set, scaled with DPI - our baseline)
- buttons in the lower part (Commit, Rescan, etc), labels like "Current 
branch" - (unscaled, visibly smaller than menubar)
- you can also open "Edit -> Options", and everything there will be 
smaller size as well.

After applying patch, all fonts are scaled equally (e.q. - small DPI - 
everything small, large DPI - everything big).

If, however - you see second behavior on both cases, I'm really 
interested to get more details:

- What OS and Tcl/Tk are you using?

I remember few years ago it worked fine on my ArchLinux, so if other 
distros aren't updated something yet, it may still work.

On Arch we have Tcl/Tk 8.6.14.

And to go even deeper, we may compare results from `wish`:

 > package require Tk 8.5
8.6.14
 > font configure TkDefaultFont
-family sans-serif -size -12 -weight normal -slant roman -underline 0 
-overstrike 0
 > font actual TkDefaultFont
-family {Nokia Sans S60} -size 9 -weight normal -slant roman -underline 
0 -overstrike 0

On Thu, Jun 20 2024 at 19:24:03 +02:00:00, Johannes Sixt <j6t@kdbg.org> 
wrote:
> Am 16.06.24 um 14:37 schrieb Serhii Tereshchenko:
>>  On Sun, Jun 16 2024 at 12:30:51 +02:00:00, Johannes Sixt 
>> <j6t@kdbg.org>
>>  wrote:
>>>  Am 15.06.24 um 10:53 schrieb Serhii Tereshchenko:
>>>>    font create font_ui
>>>>    if {[lsearch -exact [font names] TkDefaultFont] != -1} {
>>>>        eval [linsert [font actual TkDefaultFont] 0 font configure
>>>>  font_ui]
>>> 
>>>  My setup does not have a 4k monitor, I run KDE and I do not know 
>>> if I
>>>  have changed a DPI setting. For the test, I have removed the [gui]
>>>  sections from my configurations to ensure that the defaults are 
>>> used.
>>> 
>>>  Under these conditions, this change does not make a difference in 
>>> how
>>>  Git GUI appears. I assume this is the expected outcome, so I take 
>>> it as
>>>  a good sign.
>>> 
>> 
>>  You can test it, by changing DPI in `~/.Xresources`
>> 
>>  `xrdb -query` to see your current DPI, then increase it a little.
>> 
>>  ```
>>  Xft.dpi: 154
>>  ```
>> 
>>  `xrdb -merge ~/.Xresources` to apply new scaling.
> 
> Thank you for this recipe. What is the expected result on the font 
> size
> with small and with large DPI values, with and without this patch?
> 
> - When I set Xft.dpi 100, I get tiny fonts.
> - When I set it to 200, I get huge fonts.
> 
> And that is the case with and without this patch. I expected that the
> font size is independent from the DPI with the patch. (I run ./git-gui
> after `make`, but without installing.)
> 
> I also see the change in font size after modifying Xft.dpi in gitk, 
> BTW.
> 
> At a minimum, the patch does not make things worse.
> 
> -- Hannes
> 



  reply	other threads:[~2024-06-20 18:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-15  8:53 [PATCH] Fix default font scaling Serhii Tereshchenko
2024-06-15 16:32 ` Eric Sunshine
2024-06-16 10:30 ` Johannes Sixt
2024-06-16 12:37   ` Serhii Tereshchenko
2024-06-20 17:24     ` Johannes Sixt
2024-06-20 18:11       ` Serhii Tereshchenko [this message]
2024-06-20 22:04         ` Johannes Sixt
2024-06-21  7:18           ` Serhii Tereshchenko
2024-06-23  9:13             ` Johannes Sixt
2024-06-23 10:11               ` serg.partizan
2024-06-23 14:00                 ` serg.partizan
2024-06-23 15:50                   ` Johannes Sixt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=N75EFS.1X38FZPYSV94@gmail.com \
    --to=serg.partizan@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=j6t@kdbg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox