-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Registering fonts after drawing on canvas seems to work fine? #1921
Comments
Update: This has now started to fail (font renders as some kind of generic default) with canvas v2.9.1, when the font is registered after the canvas is created. Examples: canvas v2.9.0 (correct font): canvas v2.9.1 (incorrect font): So I guess now the order really matters... at least on Linux. macOS doesn't seem to care. |
It's been a while since you asked, but the answer is that Pango caches all fonts present on the OS in a |
Documentation Issue?
The docs state (note emphasis):
However, going against the docs and loading the font after creating and drawing into the canvas seems to work just fine for me. My code:
Output:
This renders correctly. I guess I was expecting it to crash or something? My question is, is this just a documentation issue? Was the requirement a previous limitation with node-canvas v1 perhaps, now gone with v2?
Your Environment
The text was updated successfully, but these errors were encountered: