-
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
No Text Rendering (macos sierra, node v6.9.1) #837
Comments
that's weird, can you try doing |
Hi @chearon. That fixed the problem. It works with the pre-built libraries. Is there any way to debug and track down the issue with my libraries? This is what happens when I install $ npm i -S canvas
> canvas@1.6.2 install /Users/eugeneware/Dropbox/work/scratch/canvas-work/node_modules/canvas
> node-gyp rebuild
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
array-index setting "length": 0 +0ms
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
SOLINK_MODULE(target) Release/canvas-postbuild.node
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9
CXX(target) Release/obj.target/canvas/src/Canvas.o
CXX(target) Release/obj.target/canvas/src/CanvasGradient.o
CXX(target) Release/obj.target/canvas/src/CanvasPattern.o
CXX(target) Release/obj.target/canvas/src/CanvasRenderingContext2d.o
CXX(target) Release/obj.target/canvas/src/color.o
CXX(target) Release/obj.target/canvas/src/Image.o
CXX(target) Release/obj.target/canvas/src/ImageData.o
CXX(target) Release/obj.target/canvas/src/init.o
CXX(target) Release/obj.target/canvas/src/FontFace.o
SOLINK_MODULE(target) Release/canvas.node
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9
/Users/eugeneware/Dropbox/work/scratch/canvas-work
└─┬ canvas@1.6.2
└── nan@2.4.0
npm WARN canvas-work No description
npm WARN canvas-work No repository field.
npm WARN canvas-work No license field. |
@chearon Do you think it has something to do with having pango vs. not having pango installed? |
I don't think so because he is using the latest version of Pango. I'm really not sure what would cause that since canvas-prebuilt gets Pango from homebrew too. Maybe a |
Interesting, I think I have the same problem on my machine... I'll try to investigate |
I can't reproduce it with the same OS, node, and canvas version |
I used the default installation instructions on the
Didn't change any options. Tried the $ brew reinstall pango
==> Reinstalling pango
==> Downloading https://homebrew.bintray.com/bottles/pango-1.40.3.sierra.bottle.tar.gz
Already downloaded: /Users/eugeneware/Library/Caches/Homebrew/pango-1.40.3.sierra.bottle.tar.gz
==> Pouring pango-1.40.3.sierra.bottle.tar.gz
🍺 /usr/local/Cellar/pango/1.40.3: 125 files, 5.1M
Σ canvas-work$ npm rebuild canvas
> canvas@1.6.2 install /Users/eugeneware/Dropbox/work/scratch/canvas-work/node_modules/canvas
> node-gyp rebuild
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
SOLINK_MODULE(target) Release/canvas-postbuild.node
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9
CXX(target) Release/obj.target/canvas/src/Canvas.o
CXX(target) Release/obj.target/canvas/src/CanvasGradient.o
CXX(target) Release/obj.target/canvas/src/CanvasPattern.o
CXX(target) Release/obj.target/canvas/src/CanvasRenderingContext2d.o
CXX(target) Release/obj.target/canvas/src/color.o
CXX(target) Release/obj.target/canvas/src/Image.o
CXX(target) Release/obj.target/canvas/src/ImageData.o
CXX(target) Release/obj.target/canvas/src/init.o
CXX(target) Release/obj.target/canvas/src/FontFace.o
SOLINK_MODULE(target) Release/canvas.node
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9
canvas@1.6.2 /Users/eugeneware/Dropbox/work/scratch/canvas-work/node_modules/canvas Still has the issue. Any way to debug this, or see any error messages/warnings? It looks like a build environment issue of some description. |
OK. Had a breakthrough. I did a:
So, looks to be some issue with having pango installed? Any ideas? |
That means it's more than likely something inside Pango since if you don't have Pango, the node-canvas 1.x versions will use primitive Cairo font drawing methods. To be extra sure... try copying the example here into something like |
Hi @chearon - I think we're getting somewhere. I modified the test program to output the error code and string: if (status != CAIRO_STATUS_SUCCESS)
{
g_printerr ("Could not save png to '%s'. Error: %d %s\n", filename, status, cairo_status_to_string(status));
return 1;
} It's printing out this error: $ ./pangotest out.png
Could not save png to 'out.png'. Error: 1 out of memory |
OK. I've managed to solve this problem! The issue was that I had a: When I have this environment variable and compile I get the memory error. When I don't, it works fine! Thanks so much to @chearon and all the others on this issue for their help! So frustrating! I must have had that line there from years ago for some reason and completely forgot about it! At least if anyone else has this issue, hopefully they'll find this issue! Thanks again! |
Nice!! Thanks for following through with the solution |
Issue or Feature
When I try to write text to a canvas it simply doesn't appear. I've tried custom fonts and built-in fonts.
Steps to Reproduce
Actual Result
Expected Result
Notes
The weird thing, is that it works on node 0.10 with canvas@1.1:
But fails with node 4 LTS as well.
A coworker who's running El Capitan has it running fine.
Your Environment
The text was updated successfully, but these errors were encountered: