Use External Fonts
You can use external fonts in the output that are not normally available on the server.
External fonts are supported for PDF output only. To set up a new font for the report output, use the font to design the template on your client machine, then make it available on the server, and configure Publisher to access the font at runtime.
To use external fonts
-
Use the font in the template.
-
Copy the font to the
<WINDOWS_HOME>/fonts
directory.If you want use external fonts, you must have the license for those fonts.
-
Open Microsoft Word and build the template.
-
Insert the font in the template: Select the text or form field and then select the desired font from the font dialog box (Format > Font) or font drop down list.
The following illustration shows an example of the form field method and the text method.
-
-
Place the font in the ORACLE_HOME/common/fonts directory.
Note:
The predefined fonts are located in:
ORACLE_HOME/common/fonts
. The font location is set by the XDO_FONT_DIR variable. If this variable isn't set in your environment, then the fonts are located in$JAVA_HOME/jre/lib/fonts
. -
Set the "font" property.
You can set the font property for the report in the Font Mappings page, or in the configuration file.
To set the property in the Font Mappings page:
-
Open the report in the report editor.
-
Click Properties, then click Font Mappings.
-
Enter the font and then select the font to which you want to map it.
To set the property in the configuration file:
- Update the "fonts" section in the configuration file with the font name and its location on the server. For example, the new entry for a TrueType font is structured as follows:
<font family="MyFontName" style="normal" weight="normal"> <truetype path="\user\fonts\MyFontName.ttf"/> </font>
Administrator must set the properties in the configuration file.
-
Now you can run the report to use the font in the output as designed. For PDF output, the advanced font handling features embed the external font glyphs directly into the final document. The embedded font only contains the glyphs required for the document and not the complete font definition. Therefore the document is completely self-contained, eliminating the need to have external fonts installed on the printer.