7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2024-11-23 18:15:01 +00:00
kicad/tools/newstroke/obsolete/scale.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

11 lines
352 B
Python

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