Settings
The <Settings> element configures document-level options such as page
format, section ratios, and custom fonts.
Page Format
<Settings page_size="A4" page_orientation="portrait">
</Settings>
Attribute |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
float |
Header height as a fraction of the page (default |
|
float |
Body height fraction (default |
|
float |
Footer height fraction (default |
Custom Fonts
Register external TTF fonts so they can be used by <Text> nodes:
<Settings>
<Fonts>
<Font name="MyFont">
<FontNormal src="fonts/MyFont-Regular.ttf"/>
<FontBold src="fonts/MyFont-Bold.ttf"/>
<FontItalic src="fonts/MyFont-Italic.ttf"/>
<FontBoldItalic src="fonts/MyFont-BoldItalic.ttf"/>
</Font>
</Fonts>
</Settings>
Each <Font> declares a family name. Inside, you provide up to four
variant files:
<FontNormal>— regular weight<FontBold>— bold weight<FontItalic>— italic style<FontBoldItalic>— bold italic
Each variant requires a src attribute pointing to a .ttf file.