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

[FontLoader] If font has "bold" in name, it gets truncated #259

Open
djipco opened this issue Feb 24, 2019 · 0 comments
Open

[FontLoader] If font has "bold" in name, it gets truncated #259

djipco opened this issue Feb 24, 2019 · 0 comments

Comments

@djipco
Copy link

djipco commented Feb 24, 2019

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.

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