[Snippets] Allow otf2ttf.py to take in TTC fonts
Processes individual faces only, though. No support for writing out font collections.
This commit is contained in:
parent
0245f2c55a
commit
c9f79af8ce
@ -74,12 +74,13 @@ def main(args=None):
|
|||||||
parser.add_argument("--post-format", type=float, default=POST_FORMAT)
|
parser.add_argument("--post-format", type=float, default=POST_FORMAT)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--keep-direction", dest='reverse_direction', action='store_false')
|
"--keep-direction", dest='reverse_direction', action='store_false')
|
||||||
|
parser.add_argument("--face-index", type=int, default=0)
|
||||||
options = parser.parse_args(args)
|
options = parser.parse_args(args)
|
||||||
|
|
||||||
output = options.output or makeOutputFileName(options.input,
|
output = options.output or makeOutputFileName(options.input,
|
||||||
outputDir=None,
|
outputDir=None,
|
||||||
extension='.ttf')
|
extension='.ttf')
|
||||||
font = TTFont(options.input)
|
font = TTFont(options.input, fontNumber=options.face_index)
|
||||||
otf_to_ttf(font,
|
otf_to_ttf(font,
|
||||||
post_format=options.post_format,
|
post_format=options.post_format,
|
||||||
max_err=options.max_error,
|
max_err=options.max_error,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user