Automattic / Automattic/node-canvas

measureText is different between browser and node

Open
#801 2 comments 0 reactions 0 assignees View on GitHub
Text & Fonts
Dominant language
JavaScript
Stars
10.7k
Forks
1.2k
Avg merge
4d 8h
Merged PRs (30d)
1

Description

![image](https://cloud.githubusercontent.com/assets/361781/17805013/ffd43780-662f-11e6-9190-abf3af5ff3e3.png)
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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.