Browse Source

renamed font to fontre

v1.x
Tj Holowaychuk 14 years ago
parent
commit
0a4cba8d4e
  1. 4
      lib/canvas.js

4
lib/canvas.js

@ -60,7 +60,7 @@ var weights = 'normal|bold|bolder|lighter|[1-9](?:00)'
* Font parser RegExp;
*/
var font = new RegExp('^ *'
var fontre = new RegExp('^ *'
+ '(?:(' + weights + ') *)?'
+ '(?:(' + styles + ') *)?'
+ '(\\d+)(' + units + ') *'
@ -110,7 +110,7 @@ function normalizedColor(prop) {
var parseFont = exports.parseFont = function(str){
if (cache[str]) return cache[str];
var obj = {}
, captures = font.exec(str);
, captures = fontre.exec(str);
if (!captures) return;
obj.weight = captures[1] || 'normal';
obj.style = captures[2] || 'normal';

Loading…
Cancel
Save