Skip to content

Instantly share code, notes, and snippets.

View carlosdetoro's full-sized avatar

Carlos de Toro carlosdetoro

View GitHub Profile
@frankrolf
frankrolf / lemonvetica.py
Last active April 21, 2023 09:31
Example on how to show a given letter’s off-curve points in DrawBot
# it’s easy to access a letter’s contours through a BezierPath object:
bp = BezierPath()
bp.text(
's',
font='SFProDisplay-Heavy',
fontSize=1200)
# Fill the letter, and offset the whole canvas so it sits in the middle.
fill(1, 1, 0)
letter_width = bp.bounds()[-2] - bp.bounds()[0]