+2
−0
+100
−0
Loading
We create two prefs: browser.display.max_font_count and browser.display.max_font_attempts. max_font_count sets a limit on the number of fonts actually used in the document, and max_font_attempts sets a limit on the total number of CSS queries that a document is allowed to perform. Once either limit is reached, the browser behaves as if browser.display.use_document_fonts was set to 0 for subsequent font queries. If a pref is not set or is negative, that limit does not apply. The use of "User Fonts" (aka WebFonts, aka @font-face fonts) are exempt from both of these limits. The patch also makes such fonts take precedence over local fonts. This vastly improves typography on many sites that would otherwise hit these limits. This is done to address: https://www.torproject.org/projects/torbrowser/design/#fingerprinting-linkability