Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Override "No Remote Fonts" with Dynamic URL filtering. #363

Closed
ghost opened this issue Jun 16, 2015 · 11 comments
Closed

Unable to Override "No Remote Fonts" with Dynamic URL filtering. #363

ghost opened this issue Jun 16, 2015 · 11 comments
Labels

Comments

@ghost
Copy link

ghost commented Jun 16, 2015

I intended to use this feature to block most if not all webfonts by default, and of course, I can re-enable the whole site.

However, some sites might want to load various fonts, whereas I might only want them to load an "icon font" and let the text fall back to whatever my browser has.

The Dynamic URL filtering will allow finding the blocked font, going through the steps, but the no remote fonts will trump it.

Steps to Reproduce:

  1. Visit and site that loads fonts, block it from loading remote fonts.
  2. Open Logger, create unblock (neither noop nor allow work in the end) rule, either for the file or path.
  3. Refresh and see that the fonts will still be blocked.
@gorhill
Copy link
Owner

gorhill commented Jun 16, 2015

What about:

no-remote-fonts: * true
...
no-remote-fonts: example.com false
example.com https://fonts-whatever-cdn.com font block
example.com https://fonts-whatever-cdn.com/icons.ttf font allow

?

@ghost
Copy link
Author

ghost commented Jun 16, 2015

That sounds viable, though it requires extra rules to accomplish.

On Tue, Jun 16, 2015 at 1:05 PM, Raymond Hill notifications@github.com
wrote:

What about:

no-remote-fonts: * true
...
no-remote-fonts: example.com falseexample.com https://fonts-whatever-cdn.com font blockexample.com https://fonts-whatever-cdn.com/icons.ttf font allow

?


Reply to this email directly or view it on GitHub
#363 (comment).

@ghost
Copy link
Author

ghost commented Jun 17, 2015

Hm, still requires me to completely enable fonts, and end up in allow by default mode.

As in if a site uses font CDNs, I'd have to explicitly block those, block the 1st party fonts, then allow the specific 1st party font. All while if they change CDNs, those fonts would load.

This ties in with #320 to where if I could specify a rule such as test.com * font block would allow the block by default behavior to function. As of now, such a rule is silently trashed as invalid.

@Snapy
Copy link

Snapy commented Nov 1, 2015

You could use static filtering : *$font to block fonts everywhere and then @@||fonts.com$third-party for font CDN and/or @@||website.com/fonts/*$first-party for 1st party fonts.
Or you can use Fanboy Anti Fonts filter list.

@yurikhan
Copy link

Is there a reason not to use *$font as the default font blocking method? It has the desirable property of allowing easy exceptions.

@collinbarrett
Copy link

Is there a way to block all 3rd-party fonts? If I am already trusting a 1st party domain by loading their site's html, I trust them enough to load a font directly from them. I know that Fanboy Anti Fonts essentially covers this, but is there a rule that would be essentially no-remote-fonts: 3rd-party true (that rule does nothing, currently, that I can see) so I can ensure that all 3rd party fonts are blocked while still allowing all 1st party fonts (and not needing to create a new rule to allow 1st-party fonts for every individual site)? I've been searching for a solution for awhile for this, and haven't found anything. Thanks.

@gorhill
Copy link
Owner

gorhill commented Mar 3, 2016

*$font,third-party?

@collinbarrett
Copy link

@gorhill perfect, thanks.

@collinbarrett
Copy link

@gorhill , if I use *$font,third-party as a global rule, is there a way I can override it to allow third-party fonts when viewing a specific site? thanks.

@ghost
Copy link
Author

ghost commented Mar 22, 2016

*$font,third-party,domain=~example.com|~example2.net?

@collinbarrett
Copy link

@IDKwhattoputhere , perfect! thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants