Using "Large Text" accessibility setting in Gnome applies measurable font scaling and disrupts letterboxing
- Truncate descriptions
Gnome has an accessibility setting called "Large Text". This is also sometimes used by users who basically want 1.25 screen scaling, which is not yet stable in Gnome, even though it has different effects.
I'm not sure exactly what this does under the hood, but one of the effects is that GDK will expose the screen DPI as 120 rather than 96. On the firefox side:
- This is used for the font size DPI https://gitlab.torproject.org/tpo/applications/tor-browser/-/blob/accd3b2dd88103fbe01442c558f877e2c47fe150/gfx/thebes/gfxPlatformGtk.cpp#L435
- Which means the font scale factor will be 1.25 https://gitlab.torproject.org/tpo/applications/tor-browser/-/blob/accd3b2dd88103fbe01442c558f877e2c47fe150/gfx/thebes/gfxPlatformGtk.cpp#L461
See also https://bugzilla.mozilla.org/show_bug.cgi?id=1604761
If a tor browser user has switched on this system setting, then it can make them appear more unique and contribute to their fingerprint. I found two ways to do this.
1. Test element
You can test indirectly for the font scaling that firefox applies by inserting an element into your page
<span>test</span>
and measuring it.
2. Letterboxing
The letterboxing will still control the browser window sizing in steps. However, the height
and width
values for the window.visualViewport
are non-integer values, rather than the integer values, which would distinguish a user using "Large Text". E.g.
VisualViewport { offsetLeft: 0, offsetTop: 0, pageLeft: 0, pageTop: 0, width: 800.7999877929688, height: 450.3999938964844, scale: 1 }
Moreover, I noticed in manual testing that as you incrementally adjust the window height, the browser viewport height would jump between two close values, which further degrades the letterboxing. E.g. 450.3999938964844
and 449.6000061035156
.
- Show labels
- Show closed items