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

Standardise index.css to include all font faces #100

Closed
ed-wright opened this issue Dec 2, 2020 · 3 comments
Closed

Standardise index.css to include all font faces #100

ed-wright opened this issue Dec 2, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@ed-wright
Copy link

Is your feature request related to a problem? Please describe.
Please see issue #99, this issue is a continuation of the discussion there into a seperate feature request so that pull request can be closed.

Describe the solution you'd like
Would you consider the idea of changing the index.css? Instead of only containing the 400 font replacing it with all available font-faces for that particular font. This would avoid any breaking change, and would standardise the index.css across all fonts. This obviously would increase import size but users looking to decrease package size will look through the docs and implement one of the subset css files. This would allow users that are new to the project to get started faster and users with size constraints to use the project to its full potential. IMHO (ease of use through standardisation) >> (small code size)

Describe alternatives you've considered
Issue #99 is a manual implementation for a single font but only implements weight 300. As discussed this need to be fixed programmatically rather than manual file writing.

Additional context
N/A. I am willing to help with this and other issues if @DecliningLotus is happy. Admittedly JS is not my strongpoint as I am primarilly a Python and C++ programmer but willing to help!

@ed-wright ed-wright added the enhancement New feature or request label Dec 2, 2020
@ayuhito
Copy link
Member

ayuhito commented Dec 2, 2020

I appreciate the idea, but unfortunately, I had done this in the past until we pushed the unicode-range update.

The reason why this isn't possible is that fonts for very large languages like Noto Sans JP or Noto Sans TC have many small unicode-range subsets to reduce filesize users would need to download upon visiting a website.

If we aggregate all weights into one CSS file, we would end up with a 3MB+ index.css files for these types of fonts which is extremely counter-intuitive for the whole purpose of this project.

Does that address your suggestion or did you mean for something else?

@ed-wright
Copy link
Author

You have addressed my suggestion.

To change the idea slightly, would it be better to instead to implement #89 and remove the idea of index.css entirely. You could first put a deprecation notice so that users are aware of the change. Along with this it would be great if a user could interact with a frontend ui to select what fonts and what font weights that they want and the code to add to their projects is autogenerated.

@ayuhito
Copy link
Member

ayuhito commented Dec 3, 2020

That is probably the best way forward. It'll just be part of a major update that takes care of all breaking changes.

I'll close this for now.

@ayuhito ayuhito closed this as completed Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants