Font Subsetting Generating a Barcode PDF File

Font Model and Cross-Platform Deployment 12-3

12.2 Overview of the Font Model

Oracle Reports 11g Release 1 11.1.1 uses a new font model that supports the TTF and TTC font types on UNIX platforms. Oracle Reports uses the new font model during runtime, and it uses the old Motif toolkit during design time. The font model applies to all destination formats and supports font aliasing and font subsetting. If the REPORTS_ENHANCED_FONTHANDLING environment variable is set to NO, the old toolkit mechanism is used. The new font model offers the following features and benefits: ■ Simplifies setup, configuration, and discovery of fonts. ■ Supports TrueType Fonts TTF and TrueType Collections TTC on UNIX. ■ Supports Unicode font subsetting in PDF on UNIX. ■ Includes a simple font lookup algorithm and an enhanced formatter. ■ Automatically recognizes new fonts. ■ Supports all character sets in PDF. ■ Provides font-related diagnostics and tracing information. ■ Supports backward-compatibility with the previous font model based on the motif toolkit. ■ Uses commonly available TTF and TTC fonts as on Windows. ■ Eliminates the need to convert TTF to AFM or TFM files.

12.2.1 Font Lookup

On Windows, the font lookup mechanism is simple due to the availability of printer drivers, which have the capability of uploading fonts from the system as needed. Any output from Oracle Reports running on Windows will contain fonts from either one of the following: ■ The system ■ The printer For this reason, Oracle Reports considers both the printer and the system fonts when looking for the available fonts. On UNIX, the fonts available for generating output are either one of the following: ■ the fonts available on the printer, specifically the fonts defined in the PPD or TFM files ■ if no printer is specified, the fonts available in ScreenPrinter, screenprinter.ppd. Note: It is recommended that you use the Windows version of Oracle Reports Builder to design reports. See Also: ■ Section 9.3, Font Configuration Files ■ Section 10.8.1, ScreenPrinter 12-4 Publishing Reports to the Web with Oracle Reports Services

12.2.1.1 Font Lookup Algorithm

llustrates the process of determining the available fonts for generating report output on UNIX. Figure 12–1 Font Algorithm The following steps describe how Oracle Reports generates a list of the available fonts for generating output for example, for the screen, printer, or file: ■ Oracle Reports checks whether the REPORTS_ENHANCED_FONTHANDLING environment variable is set. ■ If the variable is set, it checks whether the TTF and TTC fonts used in the layout objects are present in REPORTS_FONT_DIRECTORY . ■ If the TTF and TTC fonts are present in REPORTS_FONT_DIRECTORY, Oracle Reports uses the TTF font in calculating metrics, which prevents misalignment in the multibyte language report output. ■ If the TTF and TTC fonts are not in the REPORTS_FONT_DIRECTORY, Oracle Reports reverts to the old toolkit mechanism, which finds the nearest matching Type 1 font on the machine. Note: If the REPORTS_ENHANCED_FONTHANDLING variable is not set, the old motif toolkit mechanism is used. Font Model and Cross-Platform Deployment 12-5

12.2.2 Configuring the New Font Model

To configure the new font model, complete the following steps:

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.

12.2.3 Font Diagnosis and Tracing

The new font model in Oracle Reports 11g Release 1 11.1.1 provides improved font diagnosability and tracing. You can configure log levels for persistent loggers and active runtime loggers. Log levels allow you to limit the amount of tracing information included in your tracing output. For example, if you set Oracle Diagnostic Logging Level Java Level = Trace:1 FINE , the following font-related information is included in your log files and tracing output: ■ Name of the font directory ■ Fonts available in the font directory ■ Fonts used by objects in a paper layout that are not available in the font directory For more information about diagnosing font issues, see Section 9.8, Diagnosing Font Issues .

12.3 Overview of Cross-Platform Issues

Oracle Reports is available on many platforms, including Windows, Linux, Sun Solaris, HP-UX, and IBM AIX. You can use Oracle Reports to develop and deploy reports on any of these platforms interchangeably. The most common scenario is that the report is developed on Windows, and is deployed on a UNIX-based environment, such as Linux see Figure 12–2 . This may result in a slight change in the look-and-feel of the deployed report. For example, when you are developing the report on Windows, you allocate enough space to each text object or field in your report. However, when you deploy and run the report on Linux, you may see that the text does not fit within the allocated space in the output. Such issues that are the direct result of change in platform are referred to as cross-platform issues. A possible cause of such issues is that the fonts available on the development platform are not available on the deployment platform. As a result, when the report is executed on the deployment platform, a substitute font needs to be used for formatting the report output. Since any two fonts are likely to have certain differences, the report output on the development and deployment platforms looks different. Note: If you choose to use the old motif toolkit, you must consider cross-platform issues and apply workaround solutions. It is recommended that you use the new font model for developing and deploying reports on UNIX.