1
0
mirror of https://github.com/ryanoasis/nerd-fonts.git synced 2024-12-19 20:12:52 +02:00
nerd-fonts/bin/scripts/name_parser/query_panose
Fini Jastrow 20609652ea name-parser: Specify python version
[why]
Sometimes scripts can not be run.

[how]
Depending on installed python versions and 'alternatives' setup the
script's shebang needs to point to python3 of course.

Also the files need the executable bit set.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2022-08-22 10:53:05 +02:00

17 lines
305 B
Python
Executable File

#!/usr/bin/env python3
# coding=utf8
import fontforge
import sys
if len(sys.argv) != 2:
print("Usage: {} font_name\n".format(sys.argv[0]))
sys.exit(1)
font = fontforge.open(sys.argv[1])
panose = list(font.os2_panose)
print("Panose 4 = {} in {}".format(panose[3], font.fullname))
font.close()