Skip to content

no-remote-fonts option not working for inlined fonts #1539

@icasdri

Description

@icasdri

uBlock Origin's no-remote-fonts: * true option (i.e. by checking "Block remote fonts" in Settings or adding that line to rules) does not have the desired effect of blocking @font-face remote webfonts from being downloaded/used.

@font-face fonts are still downloaded/used even when the option is enabled. This can be seen in Firefox's Font Inspector. Below is an example with http://arstechnica.com.

Notice that uBlock Origin's font blocking option is enabled per the red X in bottom-right of popup, yet the @font-face remote webfonts are still being used per Inspector (example of "Bebas Nueue" present in screenshot; this is also easily seen in the difference in page rendering).

Note that setting Firefox's built-in gfx.downloadable_fonts.enabled to false does have the desired effect (see Steps to Reproduce below), but this ruins uBlock Origin's popup UI as discussed in #15 when this feature was first introduced.

Steps to reproduce:

  1. Visit a site with webfonts, e.g. http://arstechnica.com, open Inspector, click on Fonts tab, observe that a number of @font-face remote webfonts are being used.
  2. Enable "Block remote fonts" in uBlock Origin's settings (or add the appropriate rule)
  3. Visit the site again (force disable cache and refresh), and observe in Font Inspector that the @font-face webfonts are still being used.
  4. Set gfx.downloadable_fonts.enabled to false in about:config (from Icons are broken with standard font set. #15, this is what no-remote-fonts is supposed to accomplish without uBlock's interface breaking)
  5. Visit the site again, and observe in Font Inspector that all fonts are now "system" fonts, and no @font-face are used.
  6. Set gfx.downloadable_fonts.enabled back to true, while keeping uBlock Origin's "Block remote fonts" option, and observe on the site in Font Inspector that the @font-face webfonts come back, signifying that uBlock's option has no effect.

Version information:

  • Firefox 45.0.1 (new profile, no other extensions, running on latest Arch Linux)
  • uBlock Origin 1.6.8 (fresh from AMO, no other settings changed)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions