Configure Fonts for PDF Export
Applicable to Scroll 1.2
| This only works with commercial, academic and evaluation licenses of Scroll as this configuration is leveraging the RenderX XEP PDF engine. In particular this does not work with the Starter license, which is based on Apache FOP. |
| We are working to support non-latin characters out-of-the box. The progress of this improvement can be reviewed here: http://k15t.com/jira/browse/SCROLL-245 |
This article shows how to configure additional fonts in Scroll, e.g. for supporting non-latin characters or use fonts required by corporate design guidelines.
In order to let Scroll's PDF exporter pick up additional fonts, you need to configure the underlying XEP PDF engine.
- Save xep.xml to <CONFLUENCE-HOME>.
- Goto to the fonts section and configure additional fonts.
Configuring True Type Fonts
Create a new <font-group> element and add a <font-family> within that.
<font-group xml:base="file:/C:/Windows/Fonts/" label="Windows TrueType" embed="true" subset="true"> <font-family name="Calibri"> <font><font-data ttf="calibri.ttf"/></font> <font style="oblique"><font-data ttf="calibrii.ttf"/></font> <font weight="bold"><font-data ttf="calibrib.ttf"/></font> <font weight="bold" style="oblique"><font-data ttf="calibriz.ttf"/></font> </font-family> <font-family name="Times New"> <font><font-data ttf="times.ttf"/></font> <font style="oblique"><font-data ttf="timesi.ttf"/></font> <font weight="bold"><font-data ttf="timesbd.ttf"/></font> <font weight="bold" style="oblique"><font-data ttf="timesbi.ttf"/></font> </font-family> <font-family name="Courier New"> <font><font-data ttf="cour.ttf"/></font> <font style="oblique"><font-data ttf="couri.ttf"/></font> <font weight="bold"><font-data ttf="courbd.ttf"/></font> <font weight="bold" style="oblique"><font-data ttf="courbi.ttf"/></font> </font-family> </font-group>
Please note:
- In <font-group> the xml:base attribute specifies where the font are located. If you install on another OS, or your fonts are in a different location modify the value accordingly.
- The standard PDF fonts (Courier, Helvetica, Times, Symbol, ZapfDingbats) are installed by Acrobat Reader, so it is available on every system. If you decide to configure additional fonts, you should embed those in the PDF by setting the embed attribute to "true".
- If you don't have all style/weight combinations of a particular font, just configure the existing fonts. However, Scroll will then not be able to output these styles/weights and fall back to the standard font.
- Please note in the provided xep.xml file, there is already a <font-family> called Times, so we have called this font "Times New".
Configuring Font Aliases
The <font-alias> elements map font-families to names, which are used in themes to specify the fonts. As a minimum, the following aliases are required:
<font-alias name="monospace" value="Courier New"/> <font-alias name="sans-serif" value="Calibri"/> <font-alias name="serif" value="Times New"/> <font-alias name="cursive" value="Times New"/> <font-alias name="fantasy" value="Times New"/>
Please note:
- The contents of the value attributes have to match with configured fonts (see Configuring True Type Fonts).
- You can also configure alias for actual font names. E.g. if your themes reference a font named "Frutiger 55 Roman" but you don't have that font available and want to use Calibri instead, you can configure an alias like this: <font-alias name="Frutiger 55 Roman" value="Calibri"/>.
- It is not possible to chain aliases.

Add Comment