Elektrine lite

← Feed

@paulvanderlaan@typo.social

Post #1491234

2026-04-17 06:47 UTC

#Python #fonttools question: how easy is it to strip all PS hinting from an OTF file? Or are there already some tools out there that can do this?

Replies (4)

  • @frankrolf@typo.social 2026-04-17 07:34

    @paulvanderlaan I would assume tx can do that?

    Open ##1503146

  • @jlarmstrongiv@typo.social 2026-04-17 07:45

    @paulvanderlaan Try fonttools: ``` pyftsubset MyFont.otf \ --output-file=dehinted.otf \ --glyphs-file=<(python3 -c "from fontTools.ttLib import TTFont; print('\n'.join(TTFont('MyFont.otf').getGlyphOrder()))") \ --no-hinting \ --desubroutinize \ --retain-gids \ --layout-features='*' \ --name-IDs='*' \ --notdef-outline \ --glyph-names \ --no-prune-unicode-ranges \ --no-prune-codepage-ranges ```

    Open ##1503149

  • @justvanrossum@typo.social 2026-04-17 09:12

    @paulvanderlaan "fonttools subset" has a `--no-hinting` option that promises to drop all hints.

    Open ##1503155

  • @khaled@typo.social 2026-04-18 00:09

    @paulvanderlaan FontTools cffLib has a remove_hints() function, but it is not exposed to any dedicated command line tool option (it is used by the subsetter, for instance). Should be a few lines script to use it.

    Open ##1503156