DEV Community

anasrin
anasrin

Posted on • Originally published at anasrar.github.io

5

Convert variable font to static font using Python

fonttools

A library to manipulate font files from Python1.

Install

pip install fonttools
Enter fullscreen mode Exit fullscreen mode

Convert Font

fonttools varLib.mutator ./font.ttf wght=400 wdth=85
Enter fullscreen mode Exit fullscreen mode

Documentation: https://fonttools.readthedocs.io/en/latest/varLib/mutator.html#module-fontTools.varLib.mutator


  1. https://github.com/fonttools/fonttools

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay