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
When FontLoader tries to guess the name of the font, it strips the weight string from the filename. The problem is that the weight string might already be part of the font's name.
I realized this while trying to load a font called Grobold. In this case, the font-family generated by FontLoader becomes Gro. The substring bold is being stripped out.
It took me quite a while to figure this one out. The problem is with line 488. I would've submitted a PR but I'm not sure what would be the best way to fix this...
On a related note, now that there is broader support for FontFaceSet.load(), it might be better to use that and fallback to the current method when unavailable.
The text was updated successfully, but these errors were encountered:
When
FontLoader
tries to guess the name of the font, it strips the weight string from the filename. The problem is that the weight string might already be part of the font's name.I realized this while trying to load a font called Grobold. In this case, the font-family generated by
FontLoader
becomes Gro. The substring bold is being stripped out.It took me quite a while to figure this one out. The problem is with line 488. I would've submitted a PR but I'm not sure what would be the best way to fix this...
On a related note, now that there is broader support for FontFaceSet.load(), it might be better to use that and fallback to the current method when unavailable.
The text was updated successfully, but these errors were encountered: