googlefonts / googlefonts/roboto-flex

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

Open
#375 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
525
Forks
35
PR merge metrics
No merged PRs in 30d

Description

Adding `&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:wght@300..800` produces the following CSS (only showing Latin):

![image](https://user-images.githubusercontent.com/7201626/224915811-94f7902a-565a-4565-b524-fdef250462f2.png)

Adding `&text=Hello` to the request `https://fonts.googleapis.com/css2?family=Roboto+Flex:wght@300..800&text=Hello` produces the same CSS, and therefore the same font file.

![image](https://user-images.githubusercontent.com/7201626/224916279-96418c8d-3b55-4339-9dbb-1221799fa2a6.png)

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.