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

Using &text=<text> to limit glyphs and file size does not seem to work #375

Open
graymatter00 opened this issue Mar 14, 2023 · 0 comments
Open

Comments

@graymatter00
Copy link

Adding &text=<text> to the API call to limit the Roboto Flex glyphs and font file size does not seem to work.

Example:

https://fonts.googleapis.com/css2?family=Roboto+Flex:[email protected] produces the following CSS (only showing Latin):

image

Adding &text=Hello to the request https://fonts.googleapis.com/css2?family=Roboto+Flex:[email protected]&text=Hello produces the same CSS, and therefore the same font file.

image

I have checked the downloaded font file for both requests. They are the same size. I would expect the second request to produce a smaller font file.

Also, I have tried the same test with another variable font - Open Sans - and it worked as expected. That is, the second request produced different CSS to the first, and the resulting font file is considerably smaller.

It appears that the Roboto Flex font is ignoring the &text= command.

@graymatter00 graymatter00 changed the title Using &text=<text> to limit glyphs and file size does not seem to function Using &text=<text> to limit glyphs and file size does not seem to work Mar 14, 2023
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

No branches or pull requests

1 participant