-
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
Font Encoding or Secondary font #266
Comments
I should also note that before I start to put things on the canvas I register several TTF files, including one that I know has the symbol i'm looking for: Arial Unicode. |
Bump |
any workaround for this? |
Would love this fixed as well (for fabric.js) |
This would be great – any way? |
It's almost been a year and a half, is there still no fix for this? |
@AdamMerrifield node-canvas is in maintenance mode rather than in development. If you (or others) make a patch, chances are someone can pull it in. Otherwise, I don't see this being fixed in any foreseeable future (as much as I would want this fixed myself). |
@rcyrus If you compile node-canvas with pango support you'll be able to render using fonts with all of the required characters (like Arial Unicode). I'm not sure of a way to make |
@beaugunderson I'm no longer associated with the project that used node-canvas but hopefully your tip will help others! Thanks. |
To fix this issue, install the font as a system font and make sure the name you are using in font-family matches the installed name. I had this issue for a long time using both svg and canvas on a node server. |
If you want fallback fonts and custom fonts then see #410 and do this:
Fallback fonts should be installed system-wide with e.g:
Custom fonts just need to be in correct path as per usage in eg: |
Sorry to bump the old issue, but I have this same issue when mostly render Japanese, arabic, and other Unicode fonts. node-canvas version: v2.0.0-alpha.1 I use that version because I want custom fonts with How do I achieve custom fonts (TTF) and fallback fonts using that version? Or is there a better solution? |
Are you using Windows? Pango font substitution doesn't work there. But you can specify a comma separated list when you set |
My dev OS is windows. So I need to specify multiple fonts that support unicode? For example And my end product OS is Ubuntu LTS 16.04, still print square txt. The only attempt in ubuntu I take is only |
Closed via #715 |
Greetings. Thank you for making node-canvas as awesome as it is!
I'm using node-canvas to rasterize content that I had previously created in a web browser.
Almost everything works great, the only exception is non-standard text with custom fontFace.
'normal' text works fine but when I try something extended I get a rectangle instead of the symbol.

Examples:
Text on my browser.
Same text rendered from node-canvas.

The font in question is Quattrocentro.
Quattrocentro does not have that symbol but I was hoping it would fallback to a secondary font to fill in like a browser would.
Is there a way for node-canvas to do this or am I SOL when it comes to extended characters?
The text was updated successfully, but these errors were encountered: