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

[icons] Possibility to subset used icons #407

Open
stp-ip opened this issue Oct 11, 2018 · 5 comments
Open

[icons] Possibility to subset used icons #407

stp-ip opened this issue Oct 11, 2018 · 5 comments

Comments

@stp-ip
Copy link
Member

stp-ip commented Oct 11, 2018

Is this a BUG REPORT or FEATURE REQUEST?:
feature

What happened:
Currently we use the whole font file for 1-2 icons per page.

What you expected to happen:
Load only the used subset via svg.

Anything else we need to know?:
https://fontawesome.com/how-to-use/on-the-web/advanced/svg-javascript-core

An actual font subsetter might be coming, but using svg + javascript feels more automatic for the user. Problem might be performance impact on many icons, more complex code, and same origin issues with loading svgs.

@stp-ip stp-ip added this to the v0.15.0 milestone Oct 11, 2018
@mpourismaiel
Copy link
Member

The SVG javascript version is really heavy. It's still possible to disable fontawesome in Syna (we have to remove all the icons if it is, which we don't right now) and user can add the js version (whereas if they do and they have disabled fontawesome and we have removed the icons, no icon from the theme would be showing). It's kind of a looped problem. We can of course provide another variable for fontawesome which would add the js version instead of the font and css, along with the disabled variable which would remove the icons as well as the font and css stuff. Not sure if there is another way for it.

@stp-ip
Copy link
Member Author

stp-ip commented Oct 29, 2018

We can wait for the subsetter of fontawesome. They started work on it and it would provide us with the possibilty to create a subset of the font files. That way a user can disable the full fontawesome files and provide their own. We can figure out how that looks and works, after we have subsetted files.

@mpourismaiel
Copy link
Member

We can use a subset generated by https://icomoon.io/app and make it so that the default is the subset and another option is the full version.

@stp-ip
Copy link
Member Author

stp-ip commented Oct 29, 2018

Full version should be the default as most users will not subset as it's another thing they have to do. In my view it's an optimization thing.
Also icomoon.io doesn't support easily subsetting fontawesome. The team behind fontawesome is working on their own subsetter. We can wait this out and iterate, when I have some examples and we can point to a working fontawesome subsetter. Sounds good?

@mpourismaiel
Copy link
Member

That would be fantastic.

@stp-ip stp-ip modified the milestones: v0.15.0, v0.16.0 Jan 12, 2019
@stp-ip stp-ip removed this from the v0.16.0 milestone Dec 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants