Comment by char101
2 years ago
Doesn't appear in gVim on Windows, need to set the panose attribute first:
from fontTools import ttLib
from path import Path
output_dir = Path('mono')
for file in Path('.').files('*.otf'):
print(file)
font = ttLib.TTFont(file)
font['post'].isFixedPitch = 1
font['OS/2'].panose.bProportion = 9
font.save(output_dir / file.name)
font.close()
No comments yet
Contribute on Hacker News ↗