File tree 2 files changed +7
-3
lines changed
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 17
17
from fontline .commands import get_font_report , modify_linegap_percent , get_linegap_percent_filepath
18
18
from fontline .utilities import file_exists , is_supported_filetype
19
19
20
- # TODO: support integer addition and subtraction to the linegap value through new sub-commands
20
+ # TODO: support integer addition and subtraction to the metrics values through new sub-commands
21
21
# TODO: support .woff and .woff2 file types?
22
22
# TODO: JSON formatted metrics output
23
23
# TODO: autocorrect command?
Original file line number Diff line number Diff line change 2
2
# -*- coding: utf-8 -*-
3
3
4
4
import sys
5
+ import os .path
5
6
6
7
from fontTools import ttLib
7
8
from fontline .utilities import get_sha1
@@ -111,5 +112,8 @@ def modify_linegap_percent(fontpath, percent):
111
112
112
113
113
114
def get_linegap_percent_filepath (fontpath , percent ):
114
- path_list = fontpath .split ("." )
115
- return path_list [0 ] + "-linegap" + percent + "." + path_list [1 ]
115
+ font_basename = os .path .basename (fontpath )
116
+ font_dirname = os .path .dirname (fontpath )
117
+ basepath_list = font_basename .split ("." )
118
+ outfile_basename = basepath_list [0 ] + "-linegap" + percent + "." + basepath_list [1 ]
119
+ return os .path .join (font_dirname , outfile_basename )
You can’t perform that action at this time.
0 commit comments