Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Get width of text in browser
document.createElement("canvas")
.getContext("2d")
.measureText("Hello こんにちは 😀")
.width;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment