Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Convert font glyphs into telegram animate stickers

Revincx/ttf2tgs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ttf2tgs

Export Font Glyphs to Telegram Animated Sticker Format

Requirements

  • Python 3.x

Install pip dependencies

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 Sticker 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, between 0 and 1.0
  --svg            save glyph SVG files
  --color COLOR    fill color for SVG glyphs (default black, or white with outline enabled)
  --outline        enable outline stroke for SVG glyphs
  --outline-color OUTLINE_COLOR
                   color of outline stroke, default #000000
  --outline-thickness OUTLINE_THICKNESS
                   stroke width for outline in font units, default 5, between 1 and 9

Thanks

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

About

Convert font glyphs into telegram animate stickers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages