googlefonts / roboto-2

The Roboto family of fonts
Apache License 2.0
3.85k stars 309 forks source link

Handle Roboto Condensed via width info #268

Closed dpogue closed 4 years ago

dpogue commented 7 years ago

Roboto Condensed was being treated as its own font family, rather than as a condensed style of the Roboto family. This meant (for instance) that you could not target it in CSS via the font-stretch: condensed property.

The first commit stores the correct font width value in the font info, and the second commit unifies Roboto and Roboto Condensed into a single Roboto family.

m4rc1e commented 7 years ago

@dpogue Thank you for taking your time on this. Its very well written and I got the intention immediately.

Unfortunately the Google Fonts api can only serve weights. Every condensed family in the collection is served as a separate family.

The build chain also creates Android fonts. By combining them into one family we may break things.

dpogue commented 7 years ago

Ahh, I wasn't aware of the Google Fonts restrictions.

Unfortunately, Android is one place where I'm running into problems. If I ask for the "system-ui" font, I get "Roboto" but it doesn't use the condensed version when I ask for font-stretch: condensed.

davelab6 commented 4 years ago

@dpogue this was really brilliant work - sincere congratulations on an impressive PR!

The upcoming version of Roboto, commissioned from Font Bureau and developed in github.com/typenetwork/roboto as a "variable font" with weight and width axes, should resolve this, but it is curious that font-stretch didn't work for you on Android, I would expect that to work.

So, I'll file a new issue to track this, and close this PR, but I appreciate your work and I hope you can keep your fork and branch available for future reference :)