Web Form 2.0 Public Documentation

Typography

Typography

Typography controls the fonts and text appearance throughout the form — typeface, size, weight, and line height. You can match your brand's typographic style precisely.

Font Families

You can set one font for body text and a separate one for headings. Using different fonts for headings and body is a common typographic technique to create visual contrast and hierarchy.

grafik-20260615-110705.png

Text Variants

Beyond the font choice, you can fine-tune individual text levels — three heading sizes and two body sizes. For each, you can adjust the size, weight, and line height independently.

The two body variants serve different purposes:

  • Body — the default text style used for most content in the form

  • Secondary body — a subtler style for supporting information that should be present but not compete for attention


Font Loading

How you load a custom font depends on how you are hosting the web form.

Self-hosted

The form renders inside your page, which means it uses whatever fonts are available in that context. Load the font on your page before the form initializes — typically via a <link> tag pointing to Google Fonts, a self-hosted font, or your CDN. Once the font is available on the page, reference it by name in the Profile and the form will pick it up.

If the specified font fails to load or is not available, the form falls back to the browser's default sans-serif font.

Hosted by finAPI

If the web form is served from finAPI's infrastructure, custom fonts need to be set up on our side. Please get in touch with our support team and we will help you configure it.

Technical Setup

Typography is configured under theme.typography in the profile. All fields are optional — for any field you omit, the finAPI default applies.

Fields

Field

Description

typography.fontFamily.body

The font of all texts but the headers. Up to 512 characters.

typography.fontFamily.header

The font of the headers — falls back to fontFamily.body if not set. Up to 512 characters.

typography.h1

Largest heading — accepts fontSize, fontWeight, lineHeight

typography.h2

Second heading level — accepts fontSize, fontWeight, lineHeight

typography.h3

Third heading level — accepts fontSize, fontWeight, lineHeight

typography.body1

Default body text — accepts fontSize, fontWeight, lineHeight

typography.body2

Secondary body text — accepts fontSize, fontWeight, lineHeight

Both font family fields also accept a comma-separated list. The fonts are tried in the order given, and if one cannot be rendered on the end user's OS, the next is used.

Variant Fields

Field

Description

fontSize

Font size in pixels. Whole numbers only.

fontWeight

A CSS font-weight value — 400 for normal, 700 for bold.

lineHeight

Height of one line of text, as a multiplier of the font size. Up to 2 fraction digits, and always returned with exactly that many — 1.5 is stored and returned as 1.50.

Example

JSON
{
  "theme": {
    "typography": {
      "fontFamily": {
        "body": "Inter, sans-serif",
        "header": "Playfair Display, serif"
      },
      "h1": {
        "fontSize": 32,
        "fontWeight": 700,
        "lineHeight": 1.2
      },
      "body1": {
        "fontSize": 16,
        "fontWeight": 400,
        "lineHeight": 1.5
      },
      "body2": {
        "fontSize": 14,
        "fontWeight": 400,
        "lineHeight": 1.4
      }
    }
  }
}