Permalink
Browse files

change the name format

  • Loading branch information...
1 parent 9742b4a commit 49187272374de800808f5804254e23256c1f5aa0 @bigxixi committed on GitHub Oct 24, 2016
Showing with 2 additions and 1 deletion.
  1. +2 −1 Font-Packer.sketchplugin/Contents/Sketch/script.cocoascript
@@ -2,6 +2,7 @@
//todo:
//1.a checkbox to select and export the whole font family
//2.a progressbar when exporting
+//3.remove duplicated font files
//Not good at either coding or English, hope you can understand my code and descriptions :)
//check system language.only Chinese and English for now.
@@ -235,7 +236,7 @@ var onRun = function(context) {
var copyFonts = "";
for(var g=0;g<fontLocations.length;g++){
tempFontName = fontLocations[g].substring(fontLocations[g].lastIndexOf("/")+1,fontLocations[g].length());
- targetFontPath = collectFontPath + "/" + "Font" + (g+1) + "_" + tempFontName;
+ targetFontPath = collectFontPath + "/" + "(" + fonts[g].toString().replace(/\s/g,"") + ")" + tempFontName;
copyFonts += "cp " + '"' + fontLocations[g] + '" "' + targetFontPath + '";';
}

0 comments on commit 4918727

Please sign in to comment.