Browse Source

Merge pull request #13998 from mooncaker816/splitByUnicode

Font: handle unicode string split properly
Mr.doob 7 years ago
parent
commit
c64a4527da
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/extras/core/Font.js

+ 1 - 1
src/extras/core/Font.js

@@ -40,7 +40,7 @@ Object.assign( Font.prototype, {
 
 function createPaths( text, size, divisions, data ) {
 
-	var chars = String( text ).split( '' );
+	var chars = Array.from ? Array.from( text ) : String( text ).split( '' ); // see #13988
 	var scale = size / data.resolution;
 	var line_height = ( data.boundingBox.yMax - data.boundingBox.yMin + data.underlineThickness ) * scale;