You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text images are excessively large since all characters in the font are loaded. By including a text url parameter, detailing what characters are used, the google font can be scaled down in size significantly.
For example, https://fonts.googleapis.com/css2?family=IBM+Plex+Mono&text=fo will only deliver the f and o characters, which can spell out foo, but not bar nor Foo.
It'd be neat if this was automated on the back-end of course.
It should be noted that I managed to reduce the file size of my readme-typing from 150kb to 5kb.
The text was updated successfully, but these errors were encountered:
This is a very neat idea! I didn't know about this, but this can definitely increase the performance in many ways.
It seems like with this method, fetching the Google Fonts from the API takes 2-4 times less time than the database in many cases since it doesn't need to fetch all the different scripts.
I think I may even remove the font database connection entirely and just use the API with the text parameter.
The text images are excessively large since all characters in the font are loaded. By including a
text
url parameter, detailing what characters are used, the google font can be scaled down in size significantly.For example,
https://fonts.googleapis.com/css2?family=IBM+Plex+Mono&text=fo
will only deliver the f and o characters, which can spell out foo, but not bar nor Foo.It'd be neat if this was automated on the back-end of course.
It should be noted that I managed to reduce the file size of my readme-typing from 150kb to 5kb.
The text was updated successfully, but these errors were encountered: