Font Lookup Overview of the Font Model

12-6 Publishing Reports to the Web with Oracle Reports Services Another likely scenario in which you may encounter cross-platform issues is when the platform on which the report is finally viewed see Figure 12–2 does not have the proper fonts installed. Thus, even if the development and deployment platforms display the report output correctly, the platform on which the end-user views the report will not display the proper look-and-feel of the report. Figure 12–2 Sample Cross-Platform Deployment Scenario

12.3.1 Font Availability On Different Platforms

A font is a set of printable or displayable text characters in a specific style and size. Fonts are needed for displaying the report on the screen as well as for printing it. The metrics for these fonts are picked up by Oracle Reports while formatting the report; that is, while executing the report command. Based on the font metrics, the report is formatted and the output is produced. The font metrics are provided by specific files that must be available on the system where you are running Oracle Reports Services. On Windows, these font metrics are provided by True Type Font TTF files or True Type Collection TTC files. On UNIX platforms, the font metrics are taken from Adobe Font Metrics AFM files or TeX Font Metrics TFM files. The font availability and the metrics can vary based on the operating system used. This difference in fonts used and the rendering can affect the visual appearance of the generated output. Example 1: Tahoma, a commonly used font in single-byte regions, is available on Windows but not on UNIX. For example, a reports developer has used Tahoma font while designing the report. The output of the report looks good on the development platform; that is, Windows. The report is then ported to the deployment platform say Linux. When you submit a request to the Reports Server to execute this report, the Reports Server looks for Tahoma font metrics. It will be unable to find the metric file, since Tahoma is a Windows-specific font. Another font that closely resembles Tahoma will be used instead. This will affect the report output since a different font has been used. Example 2: The development as well as deployment platform is Windows. So Reports Servers on both the development and deployment platforms are able to access Tahoma font since both run on Windows. However, suppose an end-user views the output on Linux. All reports output formats HTML, HTMLCSS, RTF, and PDF merely refer to the fonts and do not embed the fonts in the output unless you specifically use the font embedding feature in PDF. As a result, the client system will look for the Tahoma font to display the report output on client machine. Since Tahoma is not available on Linux, the user will encounter cross-platform issues while viewing the output. Font Model and Cross-Platform Deployment 12-7

12.3.2 Fixing Font-Related Issues

As we have seen, many cross-platform issues are caused by the non-availability of fonts either on the production environment where the Reports Server is running or on the client system. These font availability issues must be resolved by a 3-step approach:

1. Development platform

: Ensure that you develop the report keeping in mind the font availability on the deployment platform. All font files that are available on Windows TTF files may not be available on UNIX AFM or TFM files. If you have the correct AFM or TFM font file available on the UNIX platform, you can continue to use it AFM for PostScript printing and TFM for PCL. For fonts with AFM files not readily available on UNIX, or if you encounter any font issues in the report output such as text misalignment, you can convert and generate an AFM file from the Windows TTF file using freely available third party utilities, such as ttf2pt1. Do not attempt to convert to a TFM file, as this may not produce reliable results.

2. Deployment platform

: Ensure that the fonts used in the report are available. For PDF output, use font aliasing to substitute the unavailable font with the closest available font. Global font aliasing can be used for all output formats.

3. Same comment holds for all the subsequent sections where you have asked to

provide examples.

4. Client platform

: Ensure that you account for font unavailability on the client system. For example, in the case of PDF output, you can use Font Subsetting or Font Embedding , as described in Chapter 11, Using PDF in Oracle Reports . In the case of HTML, HTMLCSS or RTF output formats it is not possible to embed the fonts, so it is best to design the report using fonts that are known to be available on all platforms.

12.4 Generating HTMLCSS, RTF, or Web Output

Table 12–2 shows the cross platform deployment scenario where the destination format is HTMLCSS, RTF, or the Web. This section discusses designing and deploying a report for HTMLCSS, RTF, or Web output in the following subsections: ■ Designing Your Report ■ Deploying Your Report ■ Frequently Asked Questions

12.4.1 Designing Your Report

To prepare your report before you deploy it on a UNIX platform:

1. Create a new report. While creating your report ensure that you leave additional

padding space for boilerplate and field objects. This is to ensure that the boxs size accounts for any possible increase in the text width when the report is run on the deployment platform. Table 12–2 Cross Platform Deployment - Scenario 1 Development Platform Deployment Platform Destination Format Windows UNIX HTMLCSS, RTF, or Web 12-8 Publishing Reports to the Web with Oracle Reports Services 2. Use only those fonts in your report that: ■ Are available on UNIX. All font files that are available on Windows TTF files may not be available on UNIX AFM or TFM files. If you have the correct AFM or TFM font file available on the UNIX platform, you can continue to use it AFM for PostScript and TFM for PCL. ■ Can scale well. For example, MS Sans Serif does not scale well to a different size, whereas Tahoma does. The reason is that the MS Sans Serif font is a raster font that does not scale well to any size and usually has rounding issues. On the other hand, Tahoma font is a TrueType font that is very similar in visual appearance to the MS Sans Serif font. Additionally, Tahoma is a vector font that can be scaled to any size and rotated to any angle.

12.4.2 Deploying Your Report

Deploying a Report in 11g that uses the New Font Model 1. Ensure that the REPORTS_ENHANCED_FONTHANDLING environment variable is set to yes. The default value is yes.

2. Copy all the TTF and TTC files, which are used in the report, to the REPORTS_

FONT_DIRECTORY. The default font directory is ORACLE_ INSTANCEreportsfonts.

3. Remove any unnecessary aliasing from the uifont.ali file. For example, Arial is

aliased to Helvetica, by default. If your report uses the Arial font, you must remove the aliasing from the uifont.ali file.

4. Run the Report.

Deploying Reports in Pre-11g Version that uses Motif Tool Kit Mechanism For fonts with AFM files not readily available on UNIX, or if you encounter any font issues in the report output such as text misalignment, you can convert and generate an AFM file from the Windows TTF file using freely available third party utilities, such as ttf2pt1. Do not attempt to convert to a TFM file, as this may not produce reliable results. To deploy your report on a UNIX platform when AFM font files are not available:

1. Locate the TTF files corresponding to the fonts used in your report. Convert these

TTF files to AFM to ensure that you will have the AFM files for the fonts used in your report. Note: AFM support is extended only to single-byte PostScript file generation, with the exception of Japanese encoding. The encoding schemes supported for the AFM files are: AdobeStandardEncoding ExtJIS12-88-CFEncoding FontSpecific HRoman ISOLatinHebrew JIS12-88-CFEncoding JIS12e-88-CFEncoding