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

Generic font families no longer supported #4957

Closed
FelixHenninger opened this issue May 7, 2018 · 3 comments · Fixed by #5048
Closed

Generic font families no longer supported #4957

FelixHenninger opened this issue May 7, 2018 · 3 comments · Fixed by #5048

Comments

@FelixHenninger
Copy link

FelixHenninger commented May 7, 2018

Thanks a lot for putting together this library, it's super-useful! I've noticed a recent change in behavior, something that used to work but doesn't any more, namely assigning generic fontFamilies to text objects. I looked into the library, but haven't been able to figure out why this is the case. Any help would be much appreciated!

Version

2.2.3

Test Case

https://jsfiddle.net/apnqhosf/4/

Please use the drop-down menu on the right to switch between different fonts. You'll notice that some work (Times and Arial, provided they are available on your machine) while others (sans-serif and monospace) don't.

Steps to reproduce

  • Change a text object's fontFamily property to a known font, e.g. Times New Roman or Arial
  • Change the value to a generic font, such as sans-serif or monospace

Expected Behavior

The display is updated for both types of fonts.

Actual Behavior

The font family is only changed when a specific font is selected (by name, as opposed to a generic value).

@asturur
Copy link
Member

asturur commented Jun 16, 2018

I have no idea what is the fallback font for monospace, to me courier works fine.
Can it be because fonts families are now quoted in the code?

with 1.7.x it indeed works

@asturur
Copy link
Member

asturur commented Jun 17, 2018

yeah that is the bug! no quotes for those

@FelixHenninger
Copy link
Author

Hej @asturur,

I'm sorry I missed your response! Just wanted to say a big thanks for fixing this, and for your incredible work on maintaining the fabric.js library. Can I get you a glass or cup of your preferred beverage somehow, or do you have a patreon link? ;-)

All the best, and thanks again! -Felix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants