Fonts the Document Names without Carrying

Name a font in the document without carrying its program: reading software draws the letters with the font it has under that name.

Summary

A font usually travels inside the document, so that the page looks the same everywhere. Sometimes that is not wanted: the font's licence forbids it, or every machine that will open the file already has the font. Here the document carries only the font's description — its name, its measurements, the width of each letter — and reading software draws the letters with the font it has under that name, or with one it makes up from the description.

Technically

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

fonts_described_only lists the fonts, by the names items draw with them by, whose description alone the document carries: the font dictionary and its descriptor are written, the font program is not. Reading software draws the face installed under that name, or one it builds from the descriptor's measurements. A face reached by glyph index is refused, because a composite font under the Identity encoding cannot be read without its program: name a font of simple_fonts instead, reached through one-byte codes. A font carried this way counts as a font left out for the archival and accessibility checks, which refuse a document claiming either.

Request Schema

  • fonts_described_only — array of strings, optional, empty by default. Each the name of a font the request declares and reaches through one-byte codes, such as one of simple_fonts.

A name no font of the request answers to is refused, and so is a face reached by glyph index: a font of fonts drawn with directly, for one.

A Whole Request That Creates a PDF

One name below stands for a font file: put the encoded file in its place, or send the file itself beside the description, as a supplied part of the same call. One page carries a real font already encoded, and its request posts as it stands.

{
  "fonts": [{ "name": "body", "data": "PASTE_THE_FONT_FILE_BASE64_HERE" }],
  "simple_fonts": [
    { "name": "coded", "from": "body", "fitted_to": "Terms of sale" }
  ],
  "fonts_described_only": ["coded"],
  "items": [
    {
      "type": "text",
      "rect": { "llx": 72, "lly": 700, "urx": 523, "ury": 740 },
      "content": ["Terms of sale"],
      "font": "coded",
      "font_size": 18
    }
  ]
}

The line that sends it, in three languages

The fonts

Carrying a Font inside the Document The Older Type 1 Font Programs The Fourteen Fonts All Reading Software Owns The Typographic Niceties of a Font A Font Whose Letters You Draw Yourself A Backup Font for the Rarer Signs Fonts Whose Letters Cost One Byte Fonts Whose Signs Come Out in Colour A Font Whose Makers Forbid Carrying It Fonts Carried Whole

Where to Go Next

Every JSON key of a request, in one page The other forty-one settings of a request

See the Prices See the Examples