Skip to content
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

[Enhancement] Make Canvas Invocations of measureText Node Canvas Compliant #671

Open
jonobr1 opened this issue Nov 9, 2022 · 0 comments

Comments

@jonobr1
Copy link
Owner

jonobr1 commented Nov 9, 2022

Is your feature request related to a problem? Please describe.
Two.js uses context.measureText from HTML5 <canvas /> tags to know what the width of a set of rendered text is in Two.Text.getBoundingClientRect.

This works in the browser, but not in headless environments

Describe the solution you'd like
node-canvas is the defacto Canvas feature for node.js and one recommended for use with Two.js on its own documentation page. So, the measureText code in Two.Text should work with node-canvas as well as the browser.

This issue is based on the conversation here: #668

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant