Schmelvetica - Absurd fonts for an absurd world

Here I was just minding my business and all of a sudden I came across this gem: Smelvetica.

To save you a click, this clever fellow modified a popular font, which will go unnamed, and he was bullied into taking it down even though it was a parody.

I thought this was quite funny all in all. But also a little irritating that this genius had to do it by hand! What are we peasants?

So being the nerd I am, I wanted to recreate this but without downloading fontforge and click and dragging points like some manual laborer.

It turns out that it was not just the kerning that was modified, but the base position of each glyph (I had to look up what a glyph was). So I did a quick crash course on the inner guts of TrueType Fonts and what kerning is and how to load the correct font family. Was interesting but a bit of a pain as well, it's like a metaphore for life.

truly awful font

So let me provide you with the way to do it yourself with the wonderful tools of Python.

First install fonttools

$ pip install fonttools

Next do your worst!

from fontTools.ttLib import TTFont
import random
import string

ORIGINAL_FONT_PATH = "path/to/Helvetica.ttc"
GLORIOUS_FONT_PATH = "path/to/Schmelvetica.ttc"
NEW_FONTNAME = b"Schmelvetica"


# Load the font
font = TTFont(ORIGINAL_FONT_PATH, fontNumber=0, lazy=False)

# Rename it
for i, n in enumerate(font["name"].names):
    if b"Helvetica" in n.string:
        n.string = NEW_FONTNAME

# this should be unique
font["name"].names[3].string = NEW_FONTNAME + b"; 0.001; 2019-10-23"

# Have fun with kerning
for kt in font["kern"].kernTables:
    for k in itertools.product(string.ascii_letters, string.ascii_letters):
        kt.kernTable[k] = random.randint(-100, 100)
        print(k, kt.kernTable[k])


# get wobbly with it
for s in string.ascii_letters:
    # Move all points relative to the new base
    new_base = (random.randint(-100, 100), random.randint(-100, 100))
    print(s, new_base)
    for i, c in enumerate(font["glyf"][s].coordinates):
        font["glyf"][s].coordinates[i] = (c[0] + new_base[0], c[1] + new_base[1])


# Enjoy your new glorious font!
font.save(GLORIOUS_FONT_PATH)

results matching ""

    No results matching ""