Is there a system setting for the font-size of elements that include Chrome omnibox font size on Linux/X11?

301 views
Skip to first unread message

darkdiatel

unread,
Jan 15, 2022, 1:41:31 PM1/15/22
to Chromium-discuss
Hi,
As far as I understand, the font size of the omnibox (address bar) is taken from some system settings for a group of elements.
(User requests for a configuration setting for this font size that I came across were all closed with explanation by developers that the standard system font is used and that's how it should be)
I'm struggling to find the correct setting.
I use X11 without desktop
Chrome does respect the settings provided to it by xsettingsd - i.e. by setting the Gtk/FontName I get the desired font size of the tab labels
But that's it, I cannot figure out whatever is the similar setting for the Omnibox font.
I spent some time browsing the source code and it seems (it's new to me so bear with me if I'm saying nonsense) omnibox uses textfield that uses standard font +1 (size delta?), so I don't understand why it is not affected by the Ftk/FontName setting
Moreover, when I search how do users of Windows and Linux desktops achieve this, it seems like they cannot change it with any settings either (the only "solutions" that some use is scaling the entire screen with --force-device-scale-factor cli argument or Windows "enlarge fonts" global settings)
But this doesn't align with what I get from the source code: Ombnibox uses standard classes, that use some dynamically obtained default font, so it has to follow the same rules?
If anybody with some knowledge with Chrome ui code can clarify this - thanks in advance.
p.s. not hear to complain/critique - just want to make sure that it's really impossible to change that font size like everyone says.

Tom Anderson

unread,
Feb 8, 2022, 4:00:13 AM2/8/22
to Chromium-discuss, elan7...@gmail.com

The font DPI is obtained from GTK.  If using xsettings, then GTK gets it from the Xft/DPI setting.  But Chrome uses this to set the scale factor, so it will affect all UI, not just fonts.  I see the same behavior in Windows Chrome -- adjusting the font size just changes the scale factor.

I don't think adjusting the font size independently of other UI is currently possible.  We do ask GTK for the default font size [1], but we don't appear to use it in the UI.

Reply all
Reply to author
Forward
0 new messages