Open minzojian opened 8 years ago
Duplicate of #782 I think
Basically there is no way to fix this, since different browsers and OSes can use different text rendering, and measureText
must reflect what will actually be drawn...
the left side is run in chrome,and the width is (just as we can see) 32px, right side is render in node-canvas,and the character width become 60
that does seem way more wrong than it should be though, I dunno if you're using the Pango build or the other one but maybe try another font and see if you still get the same issue?
i render a simple text in fabric.js(which use node-canvas to render objects in node side) same font,same texts,but the measureText("i").width is different the left side is run in chrome,and the width is (just as we can see) 32px, right side is render in node-canvas,and the character width become 60,so that make a text wrap.cause my textbox width is limited. is any clue to make node-canvas get a right character width?