-
Notifications
You must be signed in to change notification settings - Fork 42
added all 915 google fonts available from their API #14
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
base: master
Are you sure you want to change the base?
Conversation
Why do you need all those fonts? |
I am currently working on a pdf parser that need to detect exact position of specific flags in it so I can later add data in that same position. Due to the varieties of software able to generate pdf, and their implementation, we have, neither us or our client, no control over the font nor the structure that can be used to produce the documents so if more fonts are covered the better. Why ? because in some (quite frequent) case the position of those flags are not reacheable directly and in those cases, I need to calculate the position based on the text width that take precedence of those flags, hence your tools is doing an awesome job to complete this task. |
Why is this not merged? Any reason not to want more fonts? :) |
Maybe it should be made more modular? To load only needed fonts, so that there's no extra parsing and loading from JS side. |
At which level do you think the modularity should be applied ? :) That's actually quite an interesting suggestion (maybe a conf file allowing to select the needed font only when importing the library in project )? |
Per-font modularity seems legit. |
Can we have an API exposed? so that consumers will pass the JSON(font size config) and the library shall make use of it. maybe like. |
@MI53RE 523,724 lines added? now big is the package after this? I see that a joke about black hole is lighter than node_modules is not a joke at all. |
There should be a script that generates this instead on a per font used basis. That could take the form of a rollup/webpack plugin or similar. Nobody needs/uses all 915 fonts. And I am not convinced this file can be treeshaken either. |
@Evgenus true now as I see it after all this time I agree this was quite big ^^' |
Added all the width maps for google font (915 at that time)
This has been realized through Firefox, on windows 10
Did it on Chrome but results were different and using existing mapped font as reference width were off by -10px for
andale mono
Did make sure existing font will stay untouched
Enjoy =) !!