Designing PDF Output : PDF XSL-FO Font Inclusions
PDF XSL-FO Font Inclusions
To ensure non-standard fonts are included into your generated PDF, you may need to modify the Apache FOP configuration files, apache-fop.xconf or apache-fop-1.0.xconf.
To do this, you must either create a Format or Target Override, Create the override in one of these places, for more information on overrides, See “Project Format and Target Overrides”. Depending on how you prefer to set up your project, you will create one of the following:
Per target:
Targets\<target name>\Helpers\apache-fop.xconf Targets\<target name>\Helpers\apache-fop-1.0.xconf
Per format:
Formats\<format name>\Helpers\apache-fop.xconf Formats\<format name>\Helpers\apache-fop-1.0.xconf
Formats\Helpers\apache-fop.xconf Formats\Helpers\apache-fop-1.0.xconf
Once the override has been created, open the file in a text editor of your choosing, and you will see the following markup:
<!-- Example -->
<font kerning="yes" embed-url="file:///C:/Windows/Fonts/REFSAN.TTF">
<font-triplet name="Microsoft Sans Serif" style="normal" weight="normal" />
<font kerning="yes" embed-url="file:///C:/Windows/Fonts/REFSAN.TTF">
<font-triplet name="Microsoft Sans Serif" style="italic" weight="normal" />
<!-- automatically detect operating system installed fonts -->
Modify the lines in between the comments to reflect the font you are wanting and the directory path in which it is located. Save this file, and now you can add them by using ePublisher Designer.
To add fonts in ePublisher Designer
1. In ePublisher Designer, select the View -> Style Designer menu
2. With the Paragraph Styles visible, select the [Prototype] style
3. On the Properties tab, select Font then click the icon for Family
4. If your fonts are not listed, then manually add the names of your desired font using the Custom Font Family text box
5. Select OK