Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

--disable-remote-fonts makes uBlock unusable #1181

Closed
octoploid opened this issue Apr 4, 2015 · 10 comments
Closed

--disable-remote-fonts makes uBlock unusable #1181

octoploid opened this issue Apr 4, 2015 · 10 comments

Comments

@octoploid
Copy link

shot

Could you please use gifs instead?
Thanks

@lewisje
Copy link

lewisje commented Apr 4, 2015

I didn't think the FontAwesome fonts were "remote"; anyway, I think PNGs would be better because of alpha blending.

@chrisaljoudi
Copy link
Contributor

@lewisje at one level, yes, but the sacrifice in interoperability across pixel densities is quite significant.

Still, it'd be feasible to use SVGs instead.

At that point, though, that's pretty much as good as just packaging and shipping FontAwesome with uBlock so it's all local.

@lewisje
Copy link

lewisje commented Apr 4, 2015

I briefly looked at the code and didn't see where FontAwesome was called; I originally thought it was local and was surprised that it's not.

@chrisaljoudi
Copy link
Contributor

Upon further investigation, FontAwesome isn't actually "remote" currently in uBlock. Chrome's --disable-remote-typefaces disables all webfonts included with @font-face, "remote" or not.

@my-password-is-password
Copy link

Found this, https://icomoon.io/

You pick what font library you want ( Font Awesome ) and select just the icons you want to use.

ublockfontawesomesvg1

Then you can generate SVG or a subset of the font.

ublockfontawesomesvg2

Below is the 7 icons generate into svg that I could find uBlock using. Might be missing some. I just did a search for "class fa" on github.

https://github.com/my-password-is-password/stuff/blob/master/IcoMoon%20-%20uBlock%207%20Icons.zip

Edit:
Forgot the Power button. Heres the Font Awesome subset.

https://github.com/my-password-is-password/stuff/blob/master/icomoon%20-%20uBlock%20fontAwesome%20subset.zip

@chrisaljoudi
Copy link
Contributor

@my-password-is-password yep; thanks! Very neat.

I've integrated an implementation of that into my local clone of the repo, and will be pushing it very soon (just need to make sure I didn't break anything obvious).


Side note: there are problems with the FontAwesome icons in SVG format (misalignment and incorrect sizes) — mainly because FontAwesome doesn't really provide the glyphs in independent SVGs.

So, I went with slightly different icons for some of them (the differences are visual and minor).

@chrisaljoudi
Copy link
Contributor

Hi @octoploid!

Good news! uBlock now uses a set of SVGs it ships with for all the icons. The icons are much lighter, and, of course, it works even if you have web fonts disabled.

There were multiple commits of relevance in the range [a947537...53768af).

@ghost
Copy link

ghost commented Apr 7, 2015

Thank you Chris.

@octoploid
Copy link
Author

Many thanks.

@octoploid
Copy link
Author

fix

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

No branches or pull requests

4 participants