mullvad / mullvad-browser

Privacy-focused browser for Linux, macOS and Windows. Made in collaboration between @torproject and @mullvad
https://mullvad.net/browser
1.27k stars 25 forks source link

Increasing text size without increasing fingerprinting? #235

Closed flukeeey closed 6 months ago

flukeeey commented 6 months ago

Hi!

I'm test-driving Mullvad Browser, but one show-stopper for me so far is that text at 100% zoom is waaay too small, almost unreadable on my laptop:

2024-03-22T11:26:07,668188181+00:00

I have a 14" screen running at 1920x1080 resolution. With vanilla Firefox I can just increase the default zoom level to 133% and text is then comfortably readable. But of course, changing the zoom level will make me stand out from the crowd more. Is there a way to fix the small text without increasing fingerprinting?

I'm running Mullvad Browser 13.0.12 on Chimera Linux via Flatpak, Sway is my window manager/desktop environment.

Thanks.

flukeeey commented 6 months ago

Scratch the above. I managed to increase the text size while maintaining the herd fingerprint with:

gsettings set org.gnome.desktop.interface text-scaling-factor 1.5

The UI fonts were a little too big using my previous settings, so I reduced them with:

gsettings set org.gnome.desktop.interface font-name 'Liberation Sans 11'

There was still too much padding in the UI, so I reduced this by setting browser.uidensity to 1 in about:config.

Thorin-Oakenpants commented 6 months ago

browser.uidensity only affects the chrome, but may affect your new windows sizes, but then letterboxing should still roudn the inner window, so that's ok. In the past I checked all three densities with newwin and they were ok, but it newwin and letterboxing have changed a little, and system scaling etc may affect things - also chrome font sizes could affect it

As for the rest, this is almost certainly fingerprintable. There's not easy answer .. but I have one

First .. your system scaling should make all programs usable. I have no issues on windows. That said, I am sure linux has a lot of mismatches (and I am not very linux savvy) .. and for sure, various programs even on windows have text size options.

If you change the text size of web-content: in Menu > General > Fonts > Zoom you could check zoom text only and set it to 133. And this won't touch your chrome (UI). Try it, then flick it back to how it was. This is totally going to change your fingerprint.

If you change the default zoom: Menu > General > Fonts > Zoom and uncheck zoom text only and set it to 133 - then you get the same effect with font sizes, but everything else is also zoomed (elements, images etc) so that everything is still laid out as per the web site's intended look/layout. But this is totally going to change your fingerprint. This is as you said, the same as just zooming to 133%.

And since you can't change your system scaling (because that's universal and other apps will now be too big), that only really leaves one option (besides what you've done).

If you go to about:config (type that into the urlbar and hit enter, click proceed if you get a warning) ... you can type in the search field layout.css.devPixelsPerPx. The default value for this is -1.0 (which means default system). If you change it to 1.3333, your entire browser, chrome and all is resized - I think this is pretty much similar to system scaling but for the app only. Whereas your solution (and I am not an expert on linux "stuff") seems to be a little different - but this too is going to alter your fingerprint

Probably the cleanest solution is to just use the zoom text only option: try 120% and see if you can get along. Doesn't matter what you do, you're going to alter your fingerprint

flukeeey commented 6 months ago

browser.uidensity only affects the chrome, but may affect your new windows sizes, but then letterboxing should still roudn the inner window, so that's ok. In the past I checked all three densities with newwin and they were ok, but it newwin and letterboxing have changed a little, and system scaling etc may affect things - also chrome font sizes could affect it

Thanks for clarifying! Just so I understand correctly, setting this to 1 will NOT increase fingerprinting, right?

I always run my browsers fullscreen, so new window sizes aren't an issue.

As for the rest, this is almost certainly fingerprintable. There's not easy answer .. but I have one

First .. your system scaling should make all programs usable. I have no issues on windows. That said, I am sure linux has a lot of mismatches (and I am not very linux savvy) .. and for sure, various programs even on windows have text size options.

If you change the text size of web-content: in Menu > General > Fonts > Zoom you could check zoom text only and set it to 133. And this won't touch your chrome (UI). Try it, then flick it back to how it was. This is totally going to change your fingerprint.

If you change the default zoom: Menu > General > Fonts > Zoom and uncheck zoom text only and set it to 133 - then you get the same effect with font sizes, but everything else is also zoomed (elements, images etc) so that everything is still laid out as per the web site's intended look/layout. But this is totally going to change your fingerprint. This is as you said, the same as just zooming to 133%.

And since you can't change your system scaling (because that's universal and other apps will now be too big), that only really leaves one option (besides what you've done).

If you go to about:config (type that into the urlbar and hit enter, click proceed if you get a warning) ... you can type in the search field layout.css.devPixelsPerPx. The default value for this is -1.0 (which means default system). If you change it to 1.3333, your entire browser, chrome and all is resized - I think this is pretty much similar to system scaling but for the app only. Whereas your solution (and I am not an expert on linux "stuff") seems to be a little different - but this too is going to alter your fingerprint

Probably the cleanest solution is to just use the zoom text only option: try 120% and see if you can get along. Doesn't matter what you do, you're going to alter your fingerprint

I've tried setting the default zoom level, both with and without 'zoom text only' checked. Both seem to increase fingerprinting unfortunately. My goal is to remain blended in with the crowd (what's the point of Mullvad Browser otherwise?), so this wasn't an option.

I'm aware of layout.css.devPixelsPerPx but haven't tested it. Between Gnome's text scaling and browser.uidensity, I'm pretty happy with my setup now.

Thanks again!

Thorin-Oakenpants commented 6 months ago

setting this to 1 will NOT increase fingerprinting, right

it could, but if you have letterboxing on, maybe less so - there's too many variables and you seem to alter your window size anyway

Just to be clear - any of the solutions are going to alter your fingerprint. The simplest one is measuring font or unicode sizes. Subpixels are everywhere and they come in css/layout in 1/60's (1/128's for textmetrics) but not everything works like that, and some things simply compute differently due to floats. It's very complicated.

That said, there are some sizes that are common. So choosing a single change such as default zoom 120% is almost certainly going to have less of an impact than changing e.g. 10 other things and compounding the problem.

Being able to use larger web-content (and chrome) is an accessibility issue that needs addressing, but it's very complicated