Get the latest tech news

A page looks innocent: the algorithms behind a typeset page


When you look at a page of a well-typeset book or catalog, you usually don’t notice anything special. There is some text, maybe a table, a picture or a footnote. But every line on such a page is the result of many small decisions. The algorithms behind them were invented decades ago, and people still work on them today. In this post I want to show what happens on a page. I start with the whole page and then go down step by step, until we are at the bytes in the PDF file. On each level I show how the speedata Publisher does it (it uses LuaTeX in the background) and how boxes and glue does it. boxes and glue is the Go library I am writing as a foundation for the future. Both are open source, you find them on GitHub: speedata/publisher and boxesandglue.

None

Get the Android app

Or read this on Hacker News

Read more on:

Photo of algorithms

algorithms

Photo of page

page

Photo of typeset page

typeset page

Related news:

News photo

900-Page Pre-Pantone Guide to Color from 1692 (With Complete High-Res Scan)

News photo

How to find your Amazon 'About You' page (and how to edit it)

News photo

MrBeast 'spends millions reverse engineering the algorithms on each platform'