Skip to content

System fonts are not used when remote fonts are blocked #3158

@WhyNotHugo

Description

@WhyNotHugo

Prerequisites

  • I verified that this is not a filter list issue. Report any issues with filter lists or broken website functionality in the uAssets issue tracker.
  • This is NOT a YouTube, Facebook or Twitch report. These sites MUST be reported by clicking their respective links.
  • This is not a support issue or a question. For support, questions, or help, visit /r/uBlockOrigin.
  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue.
  • The issue is not present after disabling uBO in the browser.
  • I checked the documentation to understand that the issue I am reporting is not normal behavior.

I tried to reproduce the issue when...

  • uBO is the only extension.
  • uBO uses default lists and settings.
  • using a new, unmodified browser profile.

Description

I have font awesome installed on my system (installed via apk add font-awesome).

If I enable Block remote fonts on uBlock origin, when I visit a website which uses FontAwesome, the remote font is blocked. However, the font available on my local system is not used either (the expectation is that it should).

On the other hand, if I visit a page which specifies this same font in a font-family without trying to load the font from a remote server, it is not blocked. E.g.: If I put this on an empty HTML page that doesn't load any custom fonts, it renders fine:

<div style="font-family: 'FontAwesome'"></div>

This can be generalised to all fonts; if remote fonts are blocked, system fonts that are available are not used either.

It would seem that "block remote fonts" also blocks system fonts with a matching name.

A specific URL where the issue occurs.

https://vdirsyncer.pimutils.org/en/stable/
https://rust-lang.github.io/mdBook/

Steps to Reproduce

  1. Install FontAwesome font on your system.
  2. Block remote fonts on uBlock origin
  3. Visit https://rust-lang.github.io/mdBook/

You can really use any other font to reproduce, you just have to install it first, and then visit a website using that font.

Expected behavior

Blocking remote fonts should not block system fonts.

Actual behavior

Blocking remote fonts blocks system fonts with the same name.

uBO version

1.56.0

Browser name and version

firefox-123.0-r3

Operating System and version

Alpine Linux Edge

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidnot a uBlock issue

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions