A face whose letters you draw yourself

Describe your own letters with lines and shapes, then set text in them like any other typeface.

Written at the top level of a request, under "type3_fonts"

In plain words

Written for anybody. It says what this puts on a sheet of paper, and asks nothing of you beyond that.

Sometimes you need a sign that exists in no typeface on the market: a company logo, a workshop pictogram, a tally mark. You can draw it yourself, stroke by stroke, and give it a place in a typeface of your own making. Then you set text in it like any other: you pick a size, you type the character, and the drawing appears at the right scale.

For a developer

Written for somebody who writes the calling program: the model, the units, and the settings that carry the weight.

type3_fonts declares fonts whose every letter is a drawing the request describes itself, with the same shapes an item draws on a page: a path, a rectangle, a line, a block of text. The letters live in a space of their own, and a matrix says what one unit of that space is worth in text space. Codes are handed out in order of character, so the same letters in another order build the same font.

Every key, with its default

The reference: which keys are required, which are optional, what each one defaults to and which combinations the server declines.

  • type3_fonts — array, optional, empty by default.
  • type3_fonts[].name — string, required. The name items set text in this font by.
  • type3_fonts[].matrix — array of six numbers, required. What the glyph space is worth in text space; the usual thousandth of an em is [0.001, 0, 0, 0.001, 0, 0].
  • type3_fonts[].box — object, required. The part of the glyph space that is kept: x, y, width, height, numbers, all required. Nothing outside it is drawn.
  • type3_fonts[].glyphs — array, required. The letters the font draws.
  • glyphs[].character — character, required. The character this glyph draws.
  • glyphs[].width — number, required. How far the pen moves after it, in glyph space.
  • glyphs[].box — object, optional. The shape's own bounds. A letter stating its box takes the colour of the text around it, and the colours its shapes state are set aside. A letter stating none paints itself, in its shapes' colours.
  • glyphs[].items — array, required. The shapes that draw it, in drawing order: path, rect, line. A block of text inside a letter is refused.

Codes fit in one byte. A letter reaches the colour spaces, gradients, graphics states and layers the request declares.

A whole request that draws it

Post this as it stands and a PDF comes back. Nothing has been left out of it.

{
  "type3_fonts": [
    {
      "name": "blocks",
      "matrix": [0.001, 0, 0, 0.001, 0, 0],
      "box": { "x": 0, "y": 0, "width": 700, "height": 700 },
      "glyphs": [
        {
          "character": "A",
          "width": 700,
          "box": { "x": 0, "y": 0, "width": 600, "height": 600 },
          "items": [
            {
              "type": "rect",
              "rect": { "llx": 50, "lly": 0, "urx": 550, "ury": 600 },
              "fill": [0]
            }
          ]
        }
      ]
    }
  ],
  "items": [
    {
      "type": "text",
      "rect": { "llx": 60, "lly": 700, "urx": 300, "ury": 760 },
      "content": ["AAA"],
      "font": "blocks",
      "font_size": 36
    }
  ]
}

The line that sends it, in three languages

The lettering

Carrying a font inside the document The older Type 1 font programs The fourteen faces every reader owns The typographic niceties of a face A backup face for the rarer signs

Where to go next

Every key of a request, in one page The other thirty-two settings of a request

See the prices See the examples

Glossary

byte
The unit a file's weight is counted in, the way a parcel is counted in grams. A thousand of them make a kilobyte, and a million make a megabyte — the size of one photograph taken with a telephone. A one-page PDF here weighs between six thousand and a hundred and twenty thousand, so a hundred of them fit in the space of five photographs.
font
The drawing of every letter, digit and mark a document writes, held in a file of its own. A PDF carries the fonts it is set in inside itself, which is why it opens looking the same on a machine that has never had them. Leave them out and a reader puts another font in their place, and the layout moves.
glyph
One drawn shape of a typeface. The letter A is a character; the particular drawing of it that lands on the page is a glyph. The same letter is drawn differently in every typeface.
gradient
A colour that changes across the space it fills, with no step anywhere between one end and the other: a header that fades out, a bar with some depth to it. It is described once, in a handful of numbers, and painted wherever it is wanted, so it stays sharp at any size and weighs almost nothing.
request
One call to the service: you send what the document should say, and get the document back. Your bill counts these calls, one for each document. The number of pages inside a document is never counted.
layer
A named group of things drawn on a page that a reader can switch on and off, like tracing paper laid over a plan. A drawing can hold its measurements on one and its notes on another, and a layer can be set to show on screen and stay off the printer.
colour space
The rule that says what a set of numbers means as a colour. The same three numbers are one red on a screen and another on a press, so a document says which rule it is speaking under. Say nothing and three numbers are read as the lights of a screen.
graphics state
The set of settings in force while something is being drawn: how see-through it is, how two colours mix where they overlap, the shape of the ends of a line. A shape names one and it holds for that shape alone.

Every word the site explains