Skip to content

Fonts and styles

Each entry of fonts, by family name: the name the font style property uses. Paths are resolved by the host, relative to the template by default.

fonts:
Inter: { regular: fonts/Inter-Regular.ttf, bold: fonts/Inter-Bold.ttf, fallback: [Arabic] }
Arabic: { regular: fonts/NotoSansArabic-Regular.ttf }

Type: text · Required

Path of the regular face (TrueType or OpenType), resolved by the host’s font provider.

Type: text

Path of the bold face.

Type: text

Path of the italic face.

Type: text

Path of the bold italic face.

Type: list of text

Declared families to take characters from when this family has no glyph for them, in order.

Each entry of styles, by name, applied with style on bands, elements, table columns, rows and cells. A style has the style properties below, and can extend another.

styles:
default: { font: Inter, fontSize: 9pt }
heading: { fontSize: 14pt, fontWeight: bold }
total: { extends: heading, align: end, borderTop: 0.75pt solid #000000 }

Type: text

Name of the style this one inherits from.

A named set of style properties. Bands, elements, styles, table columns, rows and cells all have these. They cascade: from the band, to the element’s named style (following extends), to the element’s own properties. Text properties are inherited by what a band or stack contains; box properties (background, padding, borders and vertical alignment) are not.

Type: text

A font family declared in fonts. Default Helvetica.

Type: length

Font size. Default 10pt.

Type: keyword

Normal or bold.

One of:

  • normal
  • bold

Type: true or false

Uses the italic face.

Type: true or false

Underlines the text.

Type: color

Text color. Default black.

Type: color

Fill color of the box. Not inherited.

Type: keyword

Horizontal alignment of text. Default start.

One of:

  • start
  • end
  • left
  • center
  • right
  • justify

Type: keyword

Base direction of text. Default auto.

One of:

  • auto
  • ltr
  • rtl

Type: keyword

Vertical alignment of the content in its box. Default top; not inherited.

One of:

  • top
  • middle
  • bottom

Type: number

Multiple of the font size.

Type: edges

Space between the border and the content. Not inherited.

Type: stroke

All four borders; the side properties override it. Not inherited.

Type: stroke

The top border.

Type: stroke

The right border.

Type: stroke

The bottom border.

Type: stroke

The left border.