Throw a decent error on missing font.
@@ -33,7 +33,15 @@ THREE.FontUtils = {
getFace: function () {
- return this.faces[ this.face ][ this.weight ][ this.style ];
+ try {
+
+ return this.faces[ this.face ][ this.weight ][ this.style ];
+ } catch (e) {
+ throw "The font " + this.face + " with " + this.weight + " weight and " + this.style + " style is missing."
+ };
},