Skip to content

Loading…

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

Closed
octoploid opened this Issue · 10 comments

4 participants

@octoploid

shot

Could you please use gifs instead?
Thanks

@lewisje

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

@chrisaljoudi
Owner

@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

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
Owner

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

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 chrisaljoudi added the fixing label
@chrisaljoudi
Owner

@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 chrisaljoudi removed the fixing label
@chrisaljoudi
Owner

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

Thank you Chris.

@octoploid

Many thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.