google / fonts

Font files available from Google Fonts, and a public issue tracker for all things Google Fonts
https://fonts.google.com
18.15k stars 2.61k forks source link

Arrows don't display in the proper font #4820

Open marctison75 opened 2 years ago

marctison75 commented 2 years ago

Describe the issue On my website, I use Playfair Display with Google Fonts. When I insert an arrow, it doesn't display the Playfair Display arrow but a generic web safe font arrow.

To Reproduce Insert an arrow → with Playfair Display.

Expected behavior The arrow should be in Playfair Display

Additional context It is also the case on the Google Fonts website. In the index, the Playfair Display arrow is correctly displayed, but on the Playfair Display page, the arrow glyph is missing. This is also the case for other fonts that have an arrow glyph.

Screenshots

Index playfair Playfair Display Page playfair-2

kenmcd commented 2 years ago

The arrows are broken in the variable font (v1.203) - which is what you see on the font page. But they do work in the static fonts - which is what you see on the search page. When you paste all these arrows into that main search page ↑↗→↘↓↙←↖↔ ... what is returned is a static font with only those characters. So if you can use the static fonts that should work. There could be a fix done, as it is broken, but not likely to happen soon, if at all. I am not sure if it is possible to force a static font using the GF API. If not, then you would need to host the static fonts yourself. There is a Playfair v2 in development now, and the arrows appear to be working in that variable font source file. But that is probably still months away from deployment in GF web fonts.

davelab6 commented 2 years ago

The reason this is working inconsistently in the catalog UI is not that the homepage tile is made with a static font, but that when entering custom preview text, the tile font is a subset generated dynamically using the API "text" parameter.

I forget who last asked about this but it was exactly this issue of arrow character access, but for the Inter font family.

I made this demo of how to use the text API parameter to access the arrow characters:

https://jsbin.com/loxosac/edit?html,output

kenmcd commented 2 years ago

The reason this is working inconsistently in the catalog UI is not that the homepage tile is made with a static font, but that when entering custom preview text, the tile font is a subset generated dynamically using the API "text" parameter.

I did download the .woff2 files to take a look at what was in there. On the catalog page the font only contained the 9 arrow characters, and notdef and space. On the font page it had 37 glyphs/22 characters, but no arrows at all. So that was confusing - as to why two arrow characters still showed. Hmmm ... I do have Playfair installed locally, so maybe that affected it.

There does appear to be some issues with the fonts and perhaps the build process. The arrows masters in the variable font do not match the .glyphs source file. And there are some interpolation errors too. My guess is this is affecting the dynamic sub-setting.

Here is PlayfairDisplay-VariableFont_wght.ttf v1.203 downloaded from GF today. These are just the 9 arrows. Only 3 of the 9 have both masters. 6 are missing the Black master. And there are interpolation errors on those three with both masters. Note: these interpolation errors are present in the v1.203 static fonts.

2022-06-23_17-01-04

Here is the .glyphs source file (which I assume is the most current) v1.203 of PlayfairDisplay.glyphs From here: https://github.com/aaronbell/Playfair-Display All 9 characters have both masters. But still have the interpolation errors. Note: this is the same as in the last original source in the v1.202 release.

2022-06-23_17-10-19

Here is the variable font on https://variable-type-tools.appspot.com This Firefox; Chrome looks the same.

2022-06-23_17-17-58

I am not an expert like you guys, but I am guessing that these issues may be affecting the sub-setting when for any weight other than Regular 400. At a minimum the interpolation issues should be fixed.

Note: the v2 beta variable TTF fonts appear to have all the correct masters etc.

marctison75 commented 2 years ago

I've tried to create a navigation for a website. With Roboto Mono, the left arrow is a generic web-safe font arrow, whereas the right is the real Roboto Mono arrow.

Unfortunately, I can't use arrows with Google Fonts because I can't use the text API parameter to access the arrow characters.

For the typographer who has made an effort to create an arrow and for the users, I think it would be incredible that it's possible right out of the box.

roboto mono