Skip to content

Commit

Permalink
Update with master
Browse files Browse the repository at this point in the history
  • Loading branch information
ramirezcgn committed Oct 4, 2021
1 parent 848b943 commit e1a117e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.js
Expand Up @@ -12,8 +12,8 @@ const { Matrix } = require('./Matrix');
const paper = require('paper');

// Transform fill-rule from evenodd to nonzero
function reorientPath(pathData) {
paper.setup('font-canvas');
function reorientPath(pathData, width, height) {
paper.setup(new paper.Size(width, height));
var path = new paper.CompoundPath(pathData);
path.reorient();
return path.pathData;
Expand Down Expand Up @@ -187,7 +187,7 @@ class SVGIcons2SVGFontStream extends Transform {
let pathData = tag.attributes.d;
//Found fill rule "evenodd" support
if (hasFillRule(tag) || parentHasFillRule(parents)) {
pathData = reorientPath(tag.attributes.d);
pathData = reorientPath(tag.attributes.d, glyph.width, glyph.height);
}
return pathData;
}
Expand Down

0 comments on commit e1a117e

Please sign in to comment.