You are not logged in.

#1 2020-10-23 13:12:51

sdanave
Member
Registered: 2020-10-23
Posts: 32

Addressbar Font Size in Chromium

Hi All,

I have installed Arch in my Dell laptop in a Virtual Box VM. I have also installed KDE Plasma as a DE. I have installed Chromium Browser.

Since the default fonts were not suitable for my eyesight, I changed the font size. However, the address bar font size is not changed and it is still tiny.

Also surprisingly, Google home page fonts are tiny as well.

Anyone has encountered this issue ?

Thanks in advance

Sachin

Offline

#2 2020-10-24 00:32:36

GaKu999
Member
From: US/Eastern
Registered: 2020-06-21
Posts: 696

Re: Addressbar Font Size in Chromium

Maybe providing a little bit more info on how you changed the fonts?

I assume so far that you changed them in:
1- Chromium
2- GTK3 settings.ini and GTK2 gtkrc
3- gsettings
4- KDE font configuration

Correct?

I can only assume chromium is not honoring the font configuration in some way, like how GTK3 software ignore my settings.ini under wayland.

Last edited by GaKu999 (2020-10-24 00:42:17)


My reposSome snippets

Heisenberg might have been here.

Offline

#3 2021-01-14 16:42:11

DAC324
Member
Registered: 2020-03-12
Posts: 80

Re: Addressbar Font Size in Chromium

GaKu999 wrote:

I can only assume chromium is not honoring the font configuration in some way, like how GTK3 software ignore my settings.ini under wayland.

Indeed, Chrome / Chromium seem to ignore any font settings, at least for configuring the font size in the address bar / omnibar.

There is only one partial workaround that I found after several hours of searching through the net:

Start Chrome / Chromium as follows:

chromium --high-dpi-support=1 --force-device-scale-factor=1.1

Adjust the value after --force-device-scale-factor=x.x according to your needs. Unfortunately, it affects the whole browser, not only the address bar, so be careful.

Offline

#4 2022-04-22 07:17:58

piedro
Member
Registered: 2013-04-11
Posts: 218

Re: Addressbar Font Size in Chromium

This doesn't change the font size of the address  as in the the URL I type...

I am having the same problem. I have to use scaling because of weak eyesight - there hasn't been a solution for this for over ten years. Chromium / Chrome devs seem to not care at all - as far as I know the address bar font cannot be scaled by any measures - the only hint is to rebuild the browser which is not recommended.

This is increasingly annoying as all browsers using the chromium backend are effected - Brave, Edge, Chrome - it's bad.

The only chrome based browser offering a solution is Vivaldi - it offers a scling UI slider and this works. THough I have to admit that Vivaldi might not the browser of your choice...

Cheers, p.

Offline

#5 2022-04-22 16:22:37

seth
Member
Registered: 2012-09-03
Posts: 62,017

Re: Addressbar Font Size in Chromium

This will only work if there's no running chromium instance, check "ps aux | grep chrom" and make sure there's no chromium process lingering around before trying to run chromium w/ forced scaling.

I have to use scaling because of weak eyesight

xrandr --output … --scale 0.5x0.5 --panning 3840x2160 #assuming this is a 1080p output

Offline

#6 2022-04-25 21:59:50

piedro
Member
Registered: 2013-04-11
Posts: 218

Re: Addressbar Font Size in Chromium

Thanks!

I tried the xrandr configuration as suggested in the Arch WIki for scaling Gnome three years ago - sadly this gave me all kinds of problems with multimonitor settings and switching between them - probably my fault and maybe this changed after the years... - I'll give it a another try on a test system soon...

For now I use KDE fractional scaling to 137% and bumping up font sizes to 150%... - that's why I need Chromium to scale it's fonts.

Do you know any good xrandr managing tool to use keyboard shortcuts to quickly change monitor and screen configuarations? (without messing up KDE)?

I tried axrandr but couldn't get it to combine different monitors to one screen... also I do not understand how the xrandr settings integrate with the KDE tools like kscreen and systemsettings for display configuration  (which doesn't work well either....)

cheers, p.

Offline

#7 2022-04-26 06:27:18

seth
Member
Registered: 2012-09-03
Posts: 62,017

Re: Addressbar Font Size in Chromium

xrandr, adrandr and kscreen all operate on the same RandR protocol to manipulate the server and I simply use xrandr shortcuts to configure what I want - instead of having some semi-smart daemon guess it.
You'd probably have to deactivate kscreen, but that's all off topic here and you should open your own thread about it.

As for on-topic chromium, try to make the flag permanent to ensure you effectively apply it w/ the next session start, https://wiki.archlinux.org/title/HiDPI# … gle_Chrome

Offline

#8 2022-04-28 22:50:13

piedro
Member
Registered: 2013-04-11
Posts: 218

Re: Addressbar Font Size in Chromium

You are probably right and it is worth doing everything with ranrd... - will be the next projct to get into... :-)

Regarding the chromium flags file - I tried that before even in combination with other scaling methods (also the suggested xrandr scaling from the arch wiki...) - but that creates new problems:

The address bar font is only 60% of the system fonts?

Sure bump up chromium scaling to 1.67 and I get a nice address bar font - but sadly now all other UI elements of chromium are way too big - 167% to be exact... 

Having one or two font-sizes (tab titles and address bar) hardcoded is a clear design flaw. It's a standing bug for way over ten years now and to my knowledge it can't be fixed with scaling the application itself - chromium  hosts two sets of fonts: the fixed hardcoded ones and the others that adapt to the system environment.

The only way to avoid this would be the other way around - set the system font-sizes to match the chromium/chrome address bar font.
And then after that reduce the virtual resolution of the screen with randr until everything is big enough to be readable.

I see that this could work in a defined kiosk mode with only a very limited set of applications. - But in a productive environment with multiple monitors and applications from different toolkits and versions? Sounds like a configuration nightmare.. not sure I can be done...

Anyway - I just try to avoid chromium based browsers... (and buy even bigger screens!) :-) 

Cheers, p.

Last edited by piedro (2022-04-28 22:55:33)

Offline

#9 2022-04-30 14:27:18

seth
Member
Registered: 2012-09-03
Posts: 62,017

Re: Addressbar Font Size in Chromium

piedro wrote:

Sure bump up chromium scaling to 1.67 and I get a nice address bar font - but sadly now all other UI elements of chromium are way too big - 167% to be exact...

piedro previously wrote:

This doesn't change the font size of the address  as in the the URL I type...

Ahem…

Anyway, this sounds as if you DPI is off?
The addressbar font is ~14pt here, what's not "small" and matches the icons in the toolbar.
=>
1. screenshot
2. xrandr -q
3. xdpyinfo | grep resolution
4. xrdb -q | grep -i dpi

You might also have "miscompensated" a bad DPI by ramping up the font sizes in chromium
(Eg. whever you find yourself using something like 20pt as standard font size, you should pause and contemplate whether there's maybe a different problem. The sane™ range is 9pt-12pt)

Offline

#10 2023-01-17 01:04:24

piedro
Member
Registered: 2013-04-11
Posts: 218

Re: Addressbar Font Size in Chromium

Hi!

Now coming back to this after a long time, - sorry for that, - I realize that I might not have stated my concern clearly.

There is no problem to scale the chrome/chromium UI (including the adress-/omni-bar) to a factor of 131.25 % by starting the browser with the start parameter

chromium --force-device-scale-factor=1.3125

But there seems to be a hardcoded value in the Chromium UI that scales the address-/omnibar font size smaller than the font used for menu items in the menu bar or in the context menues. 

The address bar font is always (no matter the forced scale factor) about two thirds of the font size of the menu font.

This proportion holds true with every setting for forced scaling. 

You can try yourself by testing with a ridiculous value like

--force-device-scale-factor=4

You'll see that menues and web address clearly use a different font size.

So what I am still looking for is a setting or workaround to get the exact same font size for menu items and text in the address bar (also collapsable tab list and so more...).

Basically I need to scale the address bar font independent of the general UI font.

A second annoyance is that the font in chromium or chrome looks lighter as the medium Roboto font I use everywhere else... There is a clear difference in font weight though the system Roboto font is used.


Thanks for reading,
p.

Offline

#11 2023-01-17 08:24:57

seth
Member
Registered: 2012-09-03
Posts: 62,017

Re: Addressbar Font Size in Chromium

The address bar font is always (no matter the forced scale factor) about two thirds of the font size of the menu font.

Not here. Not at all. (Leaving aside that there's no menubar)

seth wrote:

1. screenshot
2. xrandr -q
3. xdpyinfo | grep resolution
4. xrdb -q | grep -i dpi

Offline

#12 2023-01-28 08:17:25

piedro
Member
Registered: 2013-04-11
Posts: 218

Re: Addressbar Font Size in Chromium

Hi!

Well, I wouldn't know about "sane" font sizes as my eyes aren't sane.
Therefore I am not able to see "sane" fonts.

That's why I am depending on scaling - I need 150% to 175% scaled up UIs and fonts to even work with my computer. I have a huge screen in addition and my working distance to the monitor is less than 40cm.   

But to make sure my "insane" settings are not interfering here I have set KDE scaling factor down to 125% and font sizes to 12pt as you suggested. Here are the results: 

The screenshot of the clearly different font sizes between chromium browser UI and it's address bar:

(The image shows the same proportion whether chromium starts with or without the brower flag " --force-device-scale-factor=1.5" !)

Chrome Browser on a fresh system install

The display infos from the terminal:

xrandr -q (just the relevant part)

   HDMI-1-1 connected primary 3840x1200+0+0 (normal left inverted right x axis y axis) 1050mm x 330mm
      3840x1200     60.00 + 100.00* 

xdpyinfo | grep resolution

   resolution:    120x120 dots per inch

xrdb -q | grep -i dpi
   
   Xft.dpi:        120 

To me the configuration seems to be correct.


best regards, p.

Last edited by piedro (2023-01-28 08:18:40)

Offline

#13 2023-01-28 08:40:36

seth
Member
Registered: 2012-09-03
Posts: 62,017

Re: Addressbar Font Size in Chromium

A "sane" general font size is 8-12pt; if you've to configure much bigger stuff, you're most likely bogusly combatting bad DPI settings.

Incidentally "1050mm x 330mm" at 3840x1200 is 92 DPI, but you're running at 120, what seeks to upscale everything by ca. 30%, however that will not necessarily be honored by each and every element.
For the considered element, https://wiki.archlinux.org/title/HiDPI#GDK_3_(GTK_3) is probably relevant (I can't restart chromium to test the impact while writing this wink
Try "GDK_DPI_SCALE=1.3" and also inspect "printenv" to see whether it's maybe already set to sth. different, in particular to unscale GDK_SCALE

Offline

#14 2023-01-28 14:52:59

piedro
Member
Registered: 2013-04-11
Posts: 218

Re: Addressbar Font Size in Chromium

I am sorry, - I applaud your tenacity, but you are still missing my point:

It doesn't matter which scaling factor you apply as BOTH fonts increase by 30% with 1.3 scaling.

The UI font increases 30% and
the omnibar (address bar) font increases 30% 

resulting in

both fonts having exactly the same relative proportional size to each other.

Either the UI gets huge as side effect of having a readable address bar or
the UI scales correctly in tune with the system resulting in a tiny address bar font!

Has nothing to do with the system DPI scaling or the DPI scaling of the brwoser application itself. 

This is an outstanding bug that people complain about for more than 10 years.

It's the same in every chromium based browser (with MS Edge being the only exception...). Brave, Vivaldi, Google Chrome - every single one of them cannot adjust the font of the address / omni / awesome bar individually. There is some hardcoding going on which chromium devs refuse to address. 

If you google "tiny font address omni bar" you get many complaints, bug reports and feature requests related to this -  some of which are mine.

I asked here (again) because me experience is that here among the arch experts someone may have found a workaround using browser UIs CSS settings or a patch to the code base.

All these standard environment variables and start parameters are known to me and I use them a lot - as, - as you said, - my needs are not the intended look for the desktop or a mix of differently scaling applications.

But all these are not unmanageable - but not being able to comfortably read the URL is a no go.

So I guess I am stuck with firefox and edge for time to come... though I'd much prefer chromium or brave.

Anyway, again: thanks for your efforts and your patience!     


Best regards,
p.

Offline

#15 2023-01-28 15:05:58

seth
Member
Registered: 2012-09-03
Posts: 62,017

Re: Addressbar Font Size in Chromium

both fonts having exactly the same relative proportional size to each other.

What fonts are configured in these two files?
https://wiki.archlinux.org/title/GTK#Ba … figuration

If you google "tiny font address omni bar" you get many complaints, bug reports and feature requests related to this -  some of which are mine.

That may very well be, but I assure you that this isn't the case here - and I've done *nothing* special itr.

Edit: since the environmewnt isn't set, it's likely ~/.config/gtk-3.0/settings.ini and for the gtk2 settings (though probably irrelevant) check "echo $GTK2_RC_FILES" to make sure it's not redirected somewhere else (some DEs do so)

Edit:
Setting gtk-font-name in  ~/.config/gtk-3.0/settings.ini to an insane™ font size, I can actually perfectly reproduce this.
Chromium uses this font for pretty much everything but the omnibox (for god knows what reasons) and that's actually even addressed in the wiki wink
https://wiki.archlinux.org/title/Chromi … _too_large

Last edited by seth (2023-01-28 15:15:20)

Offline

Board footer

Powered by FluxBB