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 }regular
Section titled “regular”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.
italic
Section titled “italic”Type: text
Path of the italic face.
boldItalic
Section titled “boldItalic”Type: text
Path of the bold italic face.
fallback
Section titled “fallback”Type: list of text
Declared families to take characters from when this family has no glyph for them, in order.
styles
Section titled “styles”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 }extends
Section titled “extends”Type: text
Name of the style this one inherits from.
Style properties
Section titled “Style properties”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.
fontSize
Section titled “fontSize”Type: length
Font size. Default 10pt.
fontWeight
Section titled “fontWeight”Type: keyword
Normal or bold.
One of:
normalbold
italic
Section titled “italic”Type: true or false
Uses the italic face.
underline
Section titled “underline”Type: true or false
Underlines the text.
Type: color
Text color. Default black.
background
Section titled “background”Type: color
Fill color of the box. Not inherited.
Type: keyword
Horizontal alignment of text. Default start.
One of:
startendleftcenterrightjustify
textDirection
Section titled “textDirection”Type: keyword
Base direction of text. Default auto.
One of:
autoltrrtl
verticalAlign
Section titled “verticalAlign”Type: keyword
Vertical alignment of the content in its box. Default top; not inherited.
One of:
topmiddlebottom
lineHeight
Section titled “lineHeight”Type: number
Multiple of the font size.
hyphens
Section titled “hyphens”Type: keyword
Breaking words across lines with a hyphen. Default manual: only at soft hyphens.
One of:
manual: Only at soft hyphens (U+00AD) in the text, which show as a hyphen when a line breaks there.auto: Also where the language’s hyphenation patterns allow, when a word does not fit the rest of the line. The language is the element’slanguage, or the document’s.none: Never inside words; soft hyphens are ignored.
padding
Section titled “padding”Type: edges
Space between the border and the content. Not inherited.
border
Section titled “border”Type: stroke
All four borders; the side properties override it. Not inherited.
borderTop
Section titled “borderTop”Type: stroke
The top border.
borderRight
Section titled “borderRight”Type: stroke
The right border.
borderBottom
Section titled “borderBottom”Type: stroke
The bottom border.
borderLeft
Section titled “borderLeft”Type: stroke
The left border.
Conditional styles
Section titled “Conditional styles”A style that applies where its condition holds, to the value it belongs to: once for a text, row by row for a table column. Its named style, then its own properties, go over the element’s style; later rules go over earlier ones. Texts, table columns (for their data cells) and before and footer cells
take them, in when. A rule has the style properties, and these:
- type: text value: "{Amount:C}" when: - { if: =Amount < 0, color: "#C00000" } - { if: =Amount > 10000, style: highlight }Type: expression · Required
The condition, a boolean expression in the value’s scope: =Amount < 0.
Type: text
A named style to apply where the condition holds, before the rule’s own properties.
Styles from the data
Section titled “Styles from the data”Style properties taken from the data: each an expression evaluated with the value it belongs to (once for a text, row by row for a table column), going over the element’s style and its when rules. A result that is empty, or not a colour, size or weight, leaves the property as it is. Texts, table columns and before and footer cells take them, in
styleFrom, and a table’s header row in headerStyleFrom:
- type: text value: "{Status}" styleFrom: { color: =StatusColor, fontWeight: "=Priority > 2" }Type: expression
Text colour: #RRGGBB, a colour name such as red or LightGray, or transparent.
background
Section titled “background”Type: expression
Fill colour of the box, written as color is.
Type: expression
A font family.
fontSize
Section titled “fontSize”Type: expression
Font size: a number of points, or text with a unit such as 9pt.
fontWeight
Section titled “fontWeight”Type: expression
Font weight: bold or normal (a CSS weight of 600 or more is bold), or true for bold.