Skip to content

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MI53RE
Copy link

@MI53RE MI53RE commented Feb 8, 2019

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 =) !!

@adambisek
Copy link
Owner

Why do you need all those fonts?

@MI53RE
Copy link
Author

MI53RE commented Feb 8, 2019

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.

@coveralls
Copy link

coveralls commented Mar 5, 2019

Coverage Status

Coverage remained the same at 100.0% when pulling fe9acde on MI53RE:feature-google-font into 8bf5e90 on adambisek:master.

@iliakan
Copy link

iliakan commented Jul 27, 2019

Why is this not merged? Any reason not to want more fonts? :)

@iliakan
Copy link

iliakan commented Jul 27, 2019

Maybe it should be made more modular? To load only needed fonts, so that there's no extra parsing and loading from JS side.

@MI53RE
Copy link
Author

MI53RE commented Aug 21, 2019

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 )?

@iliakan
Copy link

iliakan commented Aug 21, 2019

Per-font modularity seems legit.

@DharanBro
Copy link

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. .useFont(fontConfig)

@Evgenus
Copy link

Evgenus commented Jan 5, 2021

@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.

@kamronbatman
Copy link

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.

@MI53RE
Copy link
Author

MI53RE commented Jan 25, 2021

@Evgenus true now as I see it after all this time I agree this was quite big ^^'
@kamronbatman in the "niche" market my company was at that time, it was actually necessary to cover as many font type as possible, and this PR is more specific to such projects indeed. Now the data in this PR might still be usefull to someone if sampled (save the time to do the job on his/her side) but then again might overload the size of the whole module if accepted. A treebased or API based aproache to get only the needed font would be more welcome indeed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants