7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2024-11-23 18:05:01 +00:00
kicad/tools/newstroke/obsolete/unscale.py
Kuba Sunderland-Ober b8fc45b14d Implement fontconv in Python.
This fixes metrics of U+1F98 (ᾘ)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14398
2023-07-24 22:23:11 +00:00

8 lines
259 B
Python

with open('CKJ_wide.lib') as fi, open('CKJ_lib.lib', 'w') as fo:
for line in fi:
tok = line.split()
if tok and tok[0] == 'P':
tok[3:-2:2] = [str(int(float(t) / 1.5)) for t in tok[3:-2:2]]
print(' '.join(tok), file=fo)