Update Utilities.js
This commit is contained in:
1 parent
2936ae1611
commit
385f7a8cf1
1 file changed
+5
@@ -123,4 +123,9 @@ function splitTextIntoPhrases(text, wordsPerLine) {
|
||||
phrases.push(phrase)
|
||||
}
|
||||
return phrases
|
||||
}
|
||||
|
||||
function getTextWidth(text) {
|
||||
var metrics = browserCanvasContext.measureText(text);
|
||||
return metrics.width;
|
||||
}
|
||||
Reference in new issue
Block a user