Opened 5 years ago

Last modified 7 months ago

#8770 new task

Verify that @font-face fallback fonts can't be probed

Reported by: mikeperry Owned by: tbb-team
Priority: High Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: tbb-fingerprinting-fonts
Cc: gk Actual Points:
Parent ID: #18097 Points:
Reviewer: Sponsor:

Description

In #8455, I disabled the local fallback rendering for @font-face. I did not attempt to disable all of the code that handles cases where WebFonts weren't downloaded yet, because I was hesitant to introduce bugs, especially without a test case to verify that what I disabled was actually relevant to font probing.

However, there did appear to be sections of the code that at least internally allowed Firefox to estimate font sizes *before* the webfont completed loading. It was not immediately clear to me if these estimations were available to content or not, and which fonts they were based on.

If they are available, it would be very useful to have a test case to verify against as I try removing/altering some of those codepaths.

Child Tickets

Change History (5)

comment:1 Changed 5 years ago by mikeperry

A simple test might be to simply write @font-face rules for font urls that either 404, or specify a port on a host that is blocked by a firewall (since it will take a good while for the TCP handshake to time out if you try to load a url from a DROP firewall rule).

Then we can see what sorts of sizes come back for that text.

comment:2 Changed 5 years ago by mikeperry

Quoting myself from #8455, in case this is a problem:

It looks like the fallback might be governed by callers of gfxUserFontSet::FindFontEntry(). Two possiblitities for further investigation are gfxFontGroup::FindPlatformFont() and gfxFontGroup::ForEachFontInternal() and their subsequnt calls to gfxPlatform::ResolveFontName() and gfxPlatformFontList::FindFontForFamily(). Both set gfxFontGroup->mSkipDrawing if it's not yet time to use the fallback font... The bad news is it looks like you can still compute the width of the fallback font even before it is actually drawn (see gfxTextRun::Draw()).

comment:3 Changed 3 years ago by erinn

Keywords: tbb-firefox-patch added

comment:4 Changed 3 years ago by erinn

Component: Firefox Patch IssuesTor Browser
Owner: changed from mikeperry to tbb-team

comment:5 Changed 7 months ago by cypherpunks

Keywords: tbb-fingerprinting-fonts added; tbb-fingerprinting tbb-firefox-patch removed
Parent ID: #18097
Severity: Normal
Note: See TracTickets for help on using tickets.