Information & Technology Management Standards


Formatting Issues Porting Oracle Reports from Windows to UNIX

The Problem

Sometimes, when building a report on one platform (e.g. Windows) and deploying it on another (e.g. Tru64 UNIX) the carefully designed output to the browser or pdf/rtf file gets misaligned, or some font sizes are not shown correct. The output of an Oracle report run client (Windows)/server (Tru64 UNIX) will satisfy the business requirements and standards for look and feel. When the same report is ported to the middle tier, the font size/type and margins might change.

This is due to the fact that rendering the report output on a different platform uses different fonts with different metrics. When designing a GUI application, remember that the fonts in the application that you design may be translated in a number of ways; therefore, it is extremely difficult to predict how the end result will display (either on a printer, or on the end user's terminal). See below for reasons.

The Solution

There is no quick fix for the issue surrounding the mismatch of fonts between the Window and Tru64 UNIX operating system. The solution is to either develop in the UNIX environment or to move the reports to the UNIX environment as early as possible in the development cycle to see what kind of format results you are getting.

One developer solved solved the problem of misaligned margins by moving the field's right margin one inch to the left so that the text all printed on the page. Oracle also recommends reducing the size of the font (i.e. if the font point size is currently 10, try setting it to size 9). Arial is the recommended font for Oracle Reports development at ITMB.

According to Oracle Reports Team, this behavior will be changed after Reports 9.0.2.2. Once we upgrade to 10g some time in the spring, we should no longer have this issue.

Screen versus printer fonts

Under Motif (UNIX GUI), it is important to remember that while display and printer fonts are somewhat similar, there are more differences than there are similarities.

X fonts (display fonts) are bitmap display glyphs that are displayed on an X terminal by an X Server.

Printer fonts are Postscript fonts (mathematical descriptions of fonts, not bitmaps) that inhabit a Postscript printer and are generated by a Postscript Interpreter on that printer.

Font mapping

Fonts may be translated for the following reasons:

  1. If you are printing, there will be a translation between the display (bitmap) and printer (Postscript) fonts. Even if the fonts are "identical", i.e., you have Helvetica Display and Printer fonts, Postscript supports kerning (snuggling a lowercase "o" under an upper case "T"), whereas X does not, then what you see on the screen will not exactly match what is printed.
  2. When the application is run, the fonts that are in the application will be translated to the fonts that currently reside in the X server. If you design the application with font Helvetica 10, but the X server only has the font Courier 20 loaded, the application is going to be run with courier 20. So, a given application may give different results depending upon the state of the X server. You can "fix" this problem by installing the correct server fonts.
  3. As a corollary to (2), if you move an application to the console on a different system (and therefore to a different X server), you can expect changes in display characteristics.