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

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

Comments

Projects
None yet
4 participants
@ghost
Copy link

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

This comment has been minimized.

Copy link
Owner

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

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

commented Dec 31, 2015

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

@collinbarrett

This comment has been minimized.

Copy link

commented Mar 3, 2016

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

This comment has been minimized.

Copy link
Owner

commented Mar 3, 2016

*$font,third-party?

@collinbarrett

This comment has been minimized.

Copy link

commented Mar 3, 2016

@gorhill perfect, thanks.

@collinbarrett

This comment has been minimized.

Copy link

commented Mar 22, 2016

@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

This comment has been minimized.

Copy link
Author

commented Mar 22, 2016

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

@collinbarrett

This comment has been minimized.

Copy link

commented Mar 22, 2016

@IDKwhattoputhere , perfect! thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.