Get the latest tech news

Shaping ligatures in monospace fonts


Published on to joshleeb's blog For some time I’ve been working towards building a graphical code editor from scratch. I’m still in the explorative phase of this project which involves creating many small, conceptual pieces to better understand the various problem spaces.

Shaping is the process of converting text (UTF-8 code points in our case) to a sequence of glyphs with positional information to be rendered. With these simplifications you can go a long way with text rendering for a basic code editor, that is, until you want to handle emojis (which also relies on a font fallback subsystem) or ligatures. From this experiment we know that the ligature spacer glyph has some information we need to process and since we’re working with a monospace font my best guess is it’s the horizontal advance.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Monospace Fonts

Monospace Fonts

Photo of Ligatures

Ligatures