This commit is contained in:
2021-11-15 02:50:46 +03:00
parent 39704489b8
commit e4c0f96c74
8 changed files with 101 additions and 0 deletions

View File

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