24.08.2015 Views

Oxygen XML Author plugin 13.2.0

Oxygen XML Author plugin 13.2.0

Oxygen XML Author plugin 13.2.0

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Transforming Documents | 304b) Set the FOP configuration file in Preferences.Go to menu Options > Preferences > <strong>XML</strong> > XSLT/FO/XQuery > FO Processors and enter the path of theFOP configuration file in the Configuration file for the built-in FOP text field.2. Set the font on the document content.This is done usually with XSLT stylesheet parameters and depends on the document type processed by the stylesheet.• For DocBook documents you can start with the predefined scenario called DocBook PDF, edit the XSLT parametersand set the font name (in our example the font family name is Arial Unicode MS) to the parametersbody.font.family and title.font.family.• For TEI documents you can start with the predefined scenario called TEI PDF, edit the XSLT parameters andset the font name (in our example Arial Unicode MS) to the parameters bodyFont and sansFont.• For DITA transformations using DITA-OT you should use an IDIOM FOP transformation and modify thefollowing two files:• ${frameworks}/dita/DITA-OT/demo/fo/cfg/fo/font-mappings.xml - the font-faceelement included in each element physical-font having the attribute char-set="default"must contain the name of the font (Arial Unicode MS in our example)• ${frameworks}/dita/DITA-OT/demo/fo/fop/conf/fop.xconf - an element auto-detectmust be inserted in the element fonts which is inside the element renderer having the attributemime="application/pdf":. . .. . .Add a Font to the Built-in FOPIf an <strong>XML</strong> document is transformed to PDF using the built-in Apache FOP processor but it contains some Unicodecharacters that cannot be rendered by the default PDF fonts then a special font that is capable to render these charactersmust be configured and embedded in the PDF result.Important: If the special font that must be set to Apache FOP is installed in the operating system there is asimple way of telling FOP to look for the font. See the simplified procedure for adding a font to FOP.1. Locate the font.First, you have to find out the name of a font that has the glyphs for the special characters you used. One font thatcovers the majority of characters, including Japanese, Cyrillic and Greek, is Arial Unicode MS.On Windows the fonts are located into the C:\Windows\Fonts directory. On Mac they are placed in/Library/Fonts. To install a new font on your system is enough to copy it in the Fonts directory.2. Generate a font metrics file from the font file.a) Open a terminal.b) Change the working directory to the <strong>Oxygen</strong> <strong>XML</strong> <strong>Author</strong> <strong>plugin</strong> install directory.c) Create the following script file in the <strong>Oxygen</strong> <strong>XML</strong> <strong>Author</strong> <strong>plugin</strong> installation directory.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!