Skip to content

Commit acdbc70

Browse files
committed
Default to the input glyph sequence for output
* Make out_glyph_sequence follow the source glyph sequence unless overridden * Update relevant documentation in help
1 parent 8f5f673 commit acdbc70

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

fontknife/frontend/__main__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ def main() -> int:
114114

115115
# Generate requested output
116116
output_path, output_kwargs = get_output_path_and_args(raw_args_dict)
117+
118+
# default to using input glyph sequence if none specified
119+
if output_kwargs.get('out_glyph_sequence', None) is None:
120+
output_kwargs['out_glyph_sequence'] = source_kwargs['glyph_sequence']
121+
117122
args.callback(font, output_path, output_kwargs)
118123

119124
return 0

fontknife/frontend/arg_parsing.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,12 @@ def cli_grapheme_arg(source: Optional[str]) -> Optional[Tuple[str, ...]]:
131131
'short_flag': '-g',
132132
'type': cli_grapheme_arg, 'default': None,
133133
'help': '''\
134-
Manually override the order of the emitted glyphs.
134+
This defaults to the value of the input glyph sequence.
135135
136-
Be careful when using this.
136+
Pass it to manually override the order of the emitted glyphs.
137+
138+
Be careful when using this as OS-specific escaping can come into
139+
play.
137140
'''
138141
},
139142
}

0 commit comments

Comments
 (0)