<?xml version="1.0" encoding="UTF-8"?> <!-- vim: set ts=2 sw=2 tw=80 ai si: --> <fop version="1.0"> <!-- Uncomment this line for Lax FO validation --> <!-- <strict-validation>false</strict-validation> --> <!-- The base folder for relative paths. --> <!-- <base>./</base> --> <!-- The base folder for the font metrics files generated by org.apache.fop.fonts.apps.TTFReader. For setting the base folder you should uncomment the next line and replace the folder value with the correct path from your computer. --> <!-- <font-base>file:/usr/share/fonts/</base> --> <!-- The image resolution. For setting the resolution of images processed by FOP you should uncomment one or both of the following lines. --> <source-resolution>120</source-resolution> <target-resolution>120</target-resolution> <!-- The format of the output page. --> <default-page-settings height="11in" width="8.5in"/> <renderers> <renderer mime="application/pdf"> <filterList> <!-- Compression using zlib flate (default is on). --> <value>flate</value> </filterList> <fonts> <!-- register all the fonts found in a directory --> <!-- <directory>C:\MyFonts1</directory> --> <!-- register all the fonts found in a directory and all of its sub directories (use with care) --> <!-- <directory recursive="true">/usr/share/fonts</directory> --> <!-- register using Palatino, using computed paths --> <!-- <font embed-url="@fonts-dir@/Palatino/Palatino-Roman.ttf"> <font-triplet name="Palatino" style="normal" weight="normal"/> </font> <font embed-url="@fonts-dir@/Palatino/Palatino-Italic.ttf"> <font-triplet name="Palatino" style="italic" weight="normal"/> </font> <font embed-url="@fonts-dir@/Palatino/Palatino-Bold.ttf"> <font-triplet name="Palatino" style="normal" weight="bold"/> </font> <font embed-url="@fonts-dir@/Palatino/Palatino-BoldItalic.ttf"> <font-triplet name="Palatino" style="italic" weight="bold"/> </font> --> <!-- register using MyriadPro Condensed, using computed paths --> <!-- <font embed-url="@fonts-dir@/MyriadPro/MyriadPro-Cond.ttf"> <font-triplet name="MyriadPro-Cond" style="normal" weight="normal"/> </font> <font embed-url="@fonts-dir@/MyriadPro/MyriadPro-CondIt.ttf"> <font-triplet name="MyriadPro-Cond" style="italic" weight="normal"/> </font> <font embed-url="@fonts-dir@/MyriadPro/MyriadPro-BoldCond.ttf"> <font-triplet name="MyriadPro-Cond" style="normal" weight="bold"/> </font> <font embed-url="@fonts-dir@/MyriadPro/MyriadPro-BoldCondIt.ttf"> <font-triplet name="MyriadPro-Cond" style="italic" weight="bold"/> </font> --> <!-- register using MyriadPro Regular, using computed paths --> <!-- <font embed-url="@fonts-dir@/MyriadPro/MyriadPro-Regular.ttf"> <font-triplet name="MyriadPro" style="normal" weight="normal"/> </font> <font embed-url="@fonts-dir@/MyriadPro/MyriadPro-It.ttf"> <font-triplet name="MyriadPro" style="italic" weight="normal"/> </font> <font embed-url="@fonts-dir@/MyriadPro/MyriadPro-Bold.ttf"> <font-triplet name="MyriadPro" style="normal" weight="bold"/> </font> <font embed-url="@fonts-dir@/MyriadPro/MyriadPro-BoldIt.ttf"> <font-triplet name="MyriadPro" style="italic" weight="bold"/> </font> --> <!-- register using TheSansMonoCd, using computed paths --> <!-- <font embed-url="@fonts-dir@/TheSansMonoCd/TheSansMonoCd-W6SemiBold.ttf"> <font-triplet name="TheSansMono" style="normal" weight="normal"/> </font> <font embed-url="@fonts-dir@/TheSansMonoCd/TheSansMonoCd-W6SemiBoldIta.ttf"> <font-triplet name="TheSansMono" style="italic" weight="normal"/> </font> <font embed-url="@fonts-dir@/TheSansMonoCd/TheSansMonoCd-W8ExtraBold.ttf"> <font-triplet name="TheSansMono" style="normal" weight="bold"/> </font> <font embed-url="@fonts-dir@/TheSansMonoCd/TheSansMonoCd-W8ExtraBoldIt.ttf"> <font-triplet name="TheSansMono" style="italic" weight="bold"/> </font> --> <!-- If you need to generate PDFs for Asian languages, uncomment the following lines, and make sure ArialUnicode is available. --> <!-- <font embed-url="@fonts-dir@/ArialUnicode/ArialUnicode.ttf"> <font-triplet name="Arial Unicode MS" style="normal" weight="normal"/> </font> --> <!-- FOP will look for other fonts in the fonts installed in the operating system. --> <auto-detect/> </fonts> </renderer> </renderers> </fop>
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#5 | 12846 | eedwards |
Adjust the FOP configuration to comment out fonts we normally use, but cannot redistribute. |
||
#4 | 12845 | eedwards |
Tidy up the FOP configuration file, in preparation for setting up a Workshop-only version that doesn't specify the fonts we use but are not licensed to redistribute. |
||
#3 | 12790 | eedwards |
Add Arial Unicode MS to the set of fonts used during PDF generation, to facilitate production of translated guides. |
||
#2 | 12788 | eedwards |
Improve PDF doc generation by using a dynamic path for font embedding within the FOP configuration. This should help with docs that live outside of //depot/main/p4-doc/manuals (such as P4Convert) |
||
#1 | 12728 | eedwards |
Upgrade ANT doc build infrastructure to assemble PDFs: - remove non-namespaced DocBook source and add namespaced DocBook source. - add Apache FOP 1.1 - copy fonts, images, XSL into _build, establishing new asset structure. The original structure remains until all guides using it can be upgraded, and several other issues can be resolved. - updated build.xml to allow for per-target build properties. - upgraded the P4SAG to use the new infrastructure. - tweaked admonition presentation in PDFs to remove admonition graphics, and resemble closely the presentation used in the new HTML layout, including the same colors. With these changes, building PDFs involves using a shell, navigating into the guide's directory (just P4SAG for now), and executing "ant pdf". Issues still to be resolved: - PDF generation encounters several warnings about missing fonts (bold versions of Symbol and ZapfDingbats), and a couple of locations where the page content exceeds the defined content area. - Due to issues within Apache FOP, PDF generation emits a substantial amount of output that is not easily suppressed without losing important warning information. - Apache FOP's interface to ANT does not expose a way to set the font base directory. The current configuration does work under Mac OSX, but further testing on Windows will need to be done to determine if the relative paths defined continue to work. The workaround is for Windows users to customize the fop-config.xml to provide absolute system paths to the required fonts. - HTML generation needs further browser testing, and exhibits broken navigation on iOS browsers within the TOC sidebar. - A number of PDF and HTML presentation tweaks still need to be made, for example: sidebars, gui* DocBook tags, whitespace, section separation, etc. |