git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Fix default font scaling

From
Johannes Sixt <j6t@kdbg.org>
Date
Jun 20, 2024, 17:24 UTC
Message-ID
<abee589d-5bad-4376-ba91-3bd611936983@kdbg.org>
In-Reply-To
<Q1B6FS.FVKOG950Y3UN@gmail.com>
Am 16.06.24 um 14:37 schrieb Serhii Tereshchenko:
Show 26 quoted lines
> 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
Previous: Serhii TereshchenkoNext: Serhii Tereshchenko
Message 5 of 12 in “Fix default font scaling”
  1. Fix default font scalingSerhii Tereshchenko, Jun 15, 2024
  2. Eric SunshineJun 15, 2024
  3. Johannes SixtJun 16, 2024
  4. Serhii TereshchenkoJun 16, 2024
  5. Johannes SixtJun 20, 2024
  6. Serhii TereshchenkoJun 20, 2024
  7. Johannes SixtJun 20, 2024
  8. Serhii TereshchenkoJun 21, 2024
  9. Johannes SixtJun 23, 2024
  10. serg.partizan@gmail.comJun 23, 2024
  11. serg.partizan@gmail.comJun 23, 2024
  12. Johannes SixtJun 23, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.