Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library
← Back to context

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()

0 comments

char101

Reply

No comments yet

Contribute on Hacker News ↗

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities