Revecto
Rendering

Fonts

Default fonts, registering fonts and Google Fonts on each engine.

Without a registered font

ChromiumForme
LatinRenderedHelvetica, Times or Courier; regular and bold Helvetica embedded
Latin Extended, Greek, CyrillicRenderedNoto Sans, embedded
Arabic, Hebrew, Hindi, ThaiRendered; right-to-left text is shaped correctlyRendered with built-in Noto fonts, embedded; Arabic-Indic and Persian digits are refused (422)
Chinese, Japanese, KoreanRenderedRefused (422) until a font covering them is linked or registered; see Chinese, Japanese and Korean on Forme
EmojiRendered in colorRendered in monochrome with Noto Emoji, embedded
EmbeddingFonts are embedded and subsetSee above

Chromium maps the generic families as follows:

FamilyFont
serifLiberation Serif
sans-serifLiberation Sans
monospaceDejaVu Sans Mono
system-uiDejaVu Sans

Forme maps sans-serif, serif and monospace to Helvetica, Times and Courier, and Noto Sans covers the Latin Extended, Greek and Cyrillic text they lack.

Forme embeds regular and bold Helvetica as Liberation Sans, a metric-compatible substitute subset to the characters used; layout does not change. Italic Helvetica, Times and Courier are not embedded: they are PDF standard fonts that viewers supply. Register a font when the exact rendering matters.

Forme's built-in Arabic, Hebrew, Hindi, Thai and emoji fonts have a regular face only: bold and italic text in these scripts is drawn with it. They cover the document's text, not characters written in CSS such as margin-box content.

With Forme, a character no available font covers is refused with 422 unsupported_document. unsupported lists it as character "<c>" (U+<hex>) is not covered by any font; for a Chinese, Japanese or Korean character it names the Noto family to link. Register a TrueType font that covers it.

Chinese, Japanese and Korean on Forme

Link the Google Fonts stylesheet of the script's Noto family:

ScriptFamily
KoreanNoto Sans KR
JapaneseNoto Sans JP
ChineseNoto Sans SC (Simplified) or Noto Sans TC (Traditional)
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700" />
<style>
  body {
    font-family: "Noto Sans JP";
  }
</style>

The stylesheet is fetched as a subset holding the document's characters, up to 800 distinct characters. A document with more fetches the whole font, which can exceed the 2 MiB fetched-font limit: it is skipped with reason font_too_large and the render is refused (422).

Register a font

Register a font with @font-face, then use it with font-family:

<style>
  @font-face {
    font-family: "Inter";
    font-weight: 400;
    font-style: normal;
    src: url("https://example.com/fonts/Inter-Regular.ttf");
  }

  @font-face {
    font-family: "Inter";
    font-weight: 700;
    font-style: normal;
    src: url("https://example.com/fonts/Inter-Bold.ttf");
  }

  body {
    font-family: "Inter";
    font-size: 11pt;
  }
</style>

The source can be a URL, a base64 data: URI, or a template asset (asset:<filename>; see Template assets).

Google Fonts

A Google Fonts stylesheet <link> works on both engines:

<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700" />

Forme rules

RuleDetail
TrueType onlyOpenType with CFF outlines, WOFF, WOFF2 and collections are refused. A fetched font in such a format is skipped.
Register every weight and stylefont-weight is normal, bold or a number; font-style is normal or italic. A style with no registered face falls back to Helvetica.
WOFF2 @font-faceSkipped with reason font_format; the text falls back to Helvetica and the PDF is produced.

Chromium accepts fonts in any web format.

Fetched fonts

A font fetched from a URL is at most 2 MiB; a larger one is skipped with reason font_too_large. See Remote resources.

On this page