Home › Forums › DITA and XMetaL Discussion › Customize PDF output fonts and RenerX graphic at bottom of page › Reply To: Customize PDF output fonts and RenerX graphic at bottom of page
Reply to: Customize PDF output fonts and RenerX graphic at bottom of pageJune 25, 2009 at 8:45 pm
The DITA OT specifies only three font types for PDF including “Sans”, “Serif” and “Monospaced”. These are mapped to actual fonts elsewhere.
To change the actual font family you need to map it to “Sans”, “Serif” or “Monospaced” (or any other font references in the XSLT / XSL-FO that you might create yourself). This is done in the following file located here (by default):
C:Program FilesCommon FilesXMetaL SharedDITA_OTdemoxmfocfgfofont-mappings.xml
C:Program FilesCommon FilesXMetaL SharedDITA_OTdemofocfgfofont-mappings.xml
The first is for the “XMetaL Enhanced PDF…” deliverables, the second is for the “Book via RenderX” deliverable (referred to as “PDF2” in the DITA OT docs).
In that file you map “logical fonts” (those referenced in the XSLT / XSL-FO) to “physical fonts” (either Adobe PDF “Base 14” fonts, or those referenced in a file called xep.xml).
If the font you specify is not one of the Adobe PDF “Base 14” fonts you will need to embed it into the PDF to ensure universal readability on every system. This is done by modifying a RenderX XEP configuration file located here (by default):
C:Program FilesCommon FilesXMetaL Sharedrenderxxep.xml
Note: RenderX XEP includes documentation and additional tools inside subfolders in the same folder.
RenderX includes sample font mappings so you can study and reuse those. Find the following comment in xep.xml:
The section right after that comment is entirely commented out, it begins like this:
This section is a sample, but if you remove the comments surrounding the section XEP will then begin embedding the fonts called “Arial”, “Times New Roman”, “Courier New”, etc… (provided they are installed in C:WindowsFonts, which is also configurable in the same section) and provided you have referenced them in the file mentioned previously. You can also add your own sections to map other fonts. The sample is thorough enough that it should show you how to do that.