mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
parent
e453b90ad2
commit
8c45786759
1 changed files with 2 additions and 2 deletions
|
@ -288,11 +288,11 @@ var Style = Base.extend(new function() {
|
|||
// To prevent an obscure iOS 7 crash, we have to convert the size to a
|
||||
// string first before passing it to the regular expression.
|
||||
// The following nonsensical statement would also prevent the bug,
|
||||
// prooving that the issue is not the regular expression itself, but
|
||||
// proving that the issue is not the regular expression itself, but
|
||||
// something deeper down in the optimizer:
|
||||
// `if (size === 0) size = 0;`
|
||||
return this.getFontWeight()
|
||||
+ ' ' + fontSize + (/\w/i.test(fontSize + '') ? ' ' : 'px ')
|
||||
+ ' ' + fontSize + (/\[a-z]/i.test(fontSize + '') ? ' ' : 'px ')
|
||||
+ this.getFontFamily();
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue