Coldtype is a cross-platform library for programming and animating display typography with Python.

Put another way: do you want to make typographic graphics and animations with code? This is a good & idiosyncratic way to do that.

🌋 Disclaimer: coldtype is alpha-quality software 🌋

TLDR (if you’re using a virtualenv based on python >= 3.7):

pip install "coldtype[viewer]"
coldtype demo

Here’s the complete code and the animation it renders:

from coldtype import *

@animation((800, 400), timeline=60, bg=1, render_show=1)
def demo(f):
    return (Glyphwise("COLDTYPE", lambda x:
        Style(Font.ColdtypeObviously(), 150
            , wdth=f.adj(-x.i*15).e("eeo", 1)))

Here’s an example of a coldtype program:

from coldtype.notebook import *

fnt = Font.ColdtypeObviously()

@renderable((700, 350))
def coldtype_simple(r):
   return (StSt("COLDTYPE", fnt, 350,
         wdth=0, tu=20, r=1, rotate=10)
      .f(hsl(0.65, 0.6)))

If you’re familiar with other graphics programming libraries, that code snippet might seem a little odd, given that it’s canvas-less & highly abbreviated, with a idiomatic emphasis on method-chaining & structured data (which can make programming animations a lot easier and faster). More on those bold words on the about page.

A more complex example

Here’s a somewhat complex animation — made entirely with coldtype — demonstrating what’s possible with not-so-much code:

The code for that video is available here.