Fixed a mistake that would cause fontFamily to hold all font data when using the font shorthand & fixes photonstorm/phaser#4141

I noticed this while investigating photonstorm/phaser#4141
This commit is contained in:
Taran van Groenigen 2018-11-22 09:40:10 +01:00 committed by GitHub
parent f8e895e1bb
commit e181a98aa2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -537,9 +537,9 @@ var TextStyle = new Class({
var i = 0;
this.fontStyle = (fontSplit.length > 2) ? fontSplit[i++] : '';
this.fontSize = fontSplit[i++] || '16px';
this.fontFamily = fontSplit[i++] || 'Courier';
fontStyle = (fontSplit.length > 2) ? fontSplit[i++] : '';
fontSize = fontSplit[i++] || '16px';
fontFamily = fontSplit[i++] || 'Courier';
}
if (fontFamily !== this.fontFamily || fontSize !== this.fontSize || fontStyle !== this.fontStyle)