File tree Expand file tree Collapse file tree 1 file changed +1
-13
lines changed
Expand file tree Collapse file tree 1 file changed +1
-13
lines changed Original file line number Diff line number Diff line change @@ -102,20 +102,8 @@ def processFontFile(fontFilePath, svgFilePathsList):
102102 svgTable .compressed = False # GZIP the SVG docs
103103 svgTable .docList = svgDocsList
104104 font [TABLE_TAG ] = svgTable
105-
106- # FontTools can't overwrite a font on save,
107- # so save to a hidden file, and then rename it
108- # https://github.com/behdad/fonttools/issues/302
109- folderPath , fontFileName = os .path .split (fontFilePath )
110- fileNameNoExtension , fileExtension = os .path .splitext (fontFileName )
111- newFontFilePath = os .path .join (folderPath , "{}{}{}" .format (
112- '.' , fileNameNoExtension , fileExtension ))
113-
114- font .save (newFontFilePath )
105+ font .save (fontFilePath )
115106 font .close ()
116- # On Windows a file can't be renamed to a file that already exists
117- os .remove (fontFilePath )
118- os .rename (newFontFilePath , fontFilePath )
119107
120108 print (
121109 "SVG table successfully added to {}" .format (fontFilePath ),
You can’t perform that action at this time.
0 commit comments