2
0
Эх сурвалжийг харах

THREE.Font: add error message

troy351 6 жил өмнө
parent
commit
17de04413f

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

@@ -74,7 +74,13 @@ function createPath( char, scale, offsetX, offsetY, data ) {
 
 	var glyph = data.glyphs[ char ] || data.glyphs[ '?' ];
 
-	if ( ! glyph ) return;
+	if ( ! glyph ) {
+
+		console.error( 'THREE.Font: character "' + char + '" does not exists in font family ' + data.familyName + '.' );
+
+		return;
+
+	}
 
 	var path = new ShapePath();