Update Utilities.js

This commit is contained in:
Luis Fernando Molina committed 2020-11-10 17:11:32 +01:00
1 parent 2936ae1611
commit 385f7a8cf1
1 file changed
+5
+5
View File
@@ -123,4 +123,9 @@ function splitTextIntoPhrases(text, wordsPerLine) {
phrases.push(phrase)
}
return phrases
}
function getTextWidth(text) {
var metrics = browserCanvasContext.measureText(text);
return metrics.width;
}