-
Notifications
You must be signed in to change notification settings - Fork 141
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
Remove dependency on fontawesome #246
Comments
The load time depend from download, upload rate and the ping time your load time from 2s suggest that the download ratw will probably be around 5 to 6 Mbits per second. With a connection 2.7/.26 Mbps, 78 ms Ping I get approximately 4.4s. |
If the removal is going to take a while, could Font Awesome be at least updated to the latest available? Existing V6.0.0 contains issues. I've updated to the v6.7.2 and the errors are gone on Firefox. |
Upgraded in c465157. But that does not solve the download time — if anyone knows how to subset fontawesome, or at least get rid of the CSS, I'll be grateful for your help. |
I don't know much about webfont and I had a quick look without success. It seems my browser loaded the follwoing:
I was able to get away with not loading Next up I looked at With relative success I managed to remove the glyph within I automated the process with I have no errors in the webconsole and no missing icon I can find. Let me know if you want me to do a similar process for the other fonts (brands, regular and v4). [1]
[2]
[3] |
That's excellent news.
Please. I suggest you structure it as two commits, one that adds your script (please create a new directory called Now the next question: can we do without the CSS? |
I think it would be worthwhile to explore the inline SVG approach a bit further – in my experience it's quite common nowadays and has mostly replaced the icon font approach. Fontawesome provides single icon SVG downloads, so it's easy to copy and paste only those that are used. It would remove the need for fontawesome CSS and font files altogether. I've prepared a proof-of-concept PR which replaces 2 of the 17 icons listed above, The aesthetics of the HTML source code suffers a little bit, but it's bearable imho. More importantly, it would involve some effort to port all 17 icons of Galene to inline SVG: case by case CSS and some Javascript and sometimes a bit of the DOM needs to be adapted, for example for the logic that swaps the mute/unmute icons. I'm happy to contribute some work but cannot promise that I'll be able to do all of it – if someone wants to team up on this (@jjsarton, @not-not-the-imp?), I'm happy to e.g. give access to my fork or collaborate in another way. |
I'm not fundamentally opposed, but I'm a little concerned about further maintenance. Since the approach requires manually inserting the SVG glyphs into the file, it will require some non-trivial expertise to add further glyphs in the future. I suspect that the approach suggested by @non-the-imp is more convenient: there's a script in the Galene sources that subsets fontawesome, in order to add a new glyph one just edits the script and runs the subsetting procedure again. |
From my subjective outside contributor point of view, I would find it more convenient being able to just copy and paste SVG into HTML instead of having to run a script with the need to set up its Python dependencies first. To make adding new inline icons less non-trivial, there could be an instruction along the lines of
(Not sure where best to put it though) |
Testing on a fairly slow link (cable Internet), I've found that Galene's load time is 2s, which is way too long for my taste.
Most of the delay is due to the loading of fontawesome, which consists of 124kB of font data and 64kB of CSS. It would be good to either avoid depending on Fontawesome altogether, or to subset the font.
The text was updated successfully, but these errors were encountered: