Browse Source

iconfont optimize

codecalm 4 years ago
parent
commit
f6e29a9378
2 changed files with 5 additions and 2 deletions
  1. 3 0
      fix-outline.py
  2. 2 2
      gulpfile.js

+ 3 - 0
fix-outline.py

@@ -20,6 +20,9 @@ for file in files("./icons-outlined"):
     print (f"Correcting outline for {file}")
     glyph = font.createChar(123, file)
     glyph.importOutlines("./icons-outlined/" + file)
+    glyph.round()
+    glyph.simplify()
+    glyph.simplify()
     glyph.correctDirection()
     glyph.export("./icons-outlined/" + file)
     glyph.clear()

+ 2 - 2
gulpfile.js

@@ -230,9 +230,9 @@ gulp.task('iconfont-svg-outline', function (cb) {
 				}
 			}).catch(error => console.log(error));
 		});
-	});
 
-	cb();
+		cb();
+	});
 });
 
 gulp.task('iconfont-optimize', function() {