add json func

This commit is contained in:
2022-04-03 09:04:24 +03:00
parent 909cd73762
commit a42013753a
39 changed files with 83 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
const canvas = document.getElementById('canvas');
const ctx = canvas.getContext('2d');
let text = ctx.measureText('Hello world');
console.log(text.width); // 56;