Letters you draw yourself

A tick, a cross and a dash drawn by the program, added to the document as a font, and set among ordinary words.

A font file holds letters somebody else drew. Sometimes what a document needs is a mark nobody drew for you: your own logo, the tick your quality sheets use, a symbol your trade has and Unicode has not. This page makes three of them with the same drawing commands a page is drawn with, hands them to the document as a font, and sets them in a line of text like any other letter.

Two things come of that. A mark can carry its own colour — the tick comes out green and the cross red wherever they are set, which no font read from a file can do — or it can state a shape and no colour at all, and then it is painted in the colour of the words around it: the same square comes out red on one line and blue on the next. And none of it costs you the text, because each mark is written down as the character it stands for: copying the line out of the finished file gives the characters back, a search finds them, and a screen reader reads them.

What this example shows

  • Letters drawn by the program, not read from a font file.
  • A mark that carries its own colour, and one that takes the colour around it.
  • Text that still copies out as the characters it stands for.

The code, in full

The same document is written twice, once in each language. Both files are shown in full, with the code coloured on the server, and can be copied in one click.

The document itself

The same document is written in each of these languages. Open the one you want to look at.

Open the document in English Open the document in French

Read the Rust source Read the Python source

First page of Letters you draw yourself

What this document weighs

This document weighs 41,544 bytes.

The team wrote this example after measuring the documents above, so there is no earlier figure to set beside it. See every document measured.

Examples near this one

A minimal PDF

The smallest complete file: a page, and shapes drawn on it.

Making the file smaller

The same document written twice, plainly and packed, with what each one weighs and what the packing saved.

Soft hyphens and no-break spaces

A justified column set twice: the long words breaking at their soft hyphens with a hyphen shown, or left whole, and a figure a no-break space keeps together.

Break points after a slash or a hyphen

A justified column set twice: file paths and compounds running past the edge with no break points, then wrapping where a break after a slash or a hyphen is allowed.

A report that lays itself out

A title, a rule, two paragraphs, a heading, a table of twenty-six rows and a footnote, handed over in reading order and broken across two pages by the engine.

Every example, by subject