|
|
@ -48,7 +48,7 @@ var weights = 'normal|bold|bolder|lighter|[1-9]00' |
|
|
|
var fontre = new RegExp('^ *' |
|
|
|
+ '(?:(' + weights + ') *)?' |
|
|
|
+ '(?:(' + styles + ') *)?' |
|
|
|
+ '(\\d+)(' + units + ') *' |
|
|
|
+ '([\\d\\.]+)(' + units + ') *' |
|
|
|
+ '((?:' + string + ')( *, *(?:' + string + '))*)' |
|
|
|
); |
|
|
|
|
|
|
@ -96,7 +96,7 @@ var parseFont = exports.parseFont = function(str){ |
|
|
|
// Populate font object
|
|
|
|
font.weight = captures[1] || 'normal'; |
|
|
|
font.style = captures[2] || 'normal'; |
|
|
|
font.size = parseInt(captures[3], 10); |
|
|
|
font.size = parseFloat(captures[3]); |
|
|
|
font.unit = captures[4]; |
|
|
|
font.family = captures[5]; |
|
|
|
|
|
|
|