/ttf2tgs

Convert font glyphs into telegram animate stickers

Primary LanguagePython

ttf2tgs

Export Font Glyphs to Telegram Animated Sticker Format

Requirements

  • Python 3.x

Install pip denpendcies

pip install -r requirements.txt

Note: If you use python virtual environments, do not forget to create and activate it before installing dependencies.

Usage

Assume that you have font file SomeFonts.ttf (or OpenType), then input all the characters you want to export in characters.txt.

python3 ttf2tgs.py SomeFonts.ttf characters.txt

And you will get Telegram Animated Stickers files under the tgs folder.

Options

options:
  -h, --help       show this help message and exit
  --output OUTPUT  target directory to the output TGS files, default ./tgs
  --scale SCALE    output image scale factor, less than 1.0
  --svg            save glyph SVG files

Thanks

  • fonttools - A library to manipulate font files from Python.
  • python-lottie - Python framework to manipulate lottie / telegram animated sticker files