Fonts (Developer Information)
Goals
Issues
Implementation

There are two main font functions needed within FOP:

For the first of these, we will implement something along the lines of a "Facade" Structural Pattern to hide the differences between the various font types and font sources from the rest of the system. Public classes will consist of TypeFaceFamily, TypeFace, and Font. (TypeFace roughly corresponds to the contents of a normal font file, while Font is a general typeface implemented at a specific point size, and perhaps with other specific parameters). When another part of FOP requests a font object, existing font objects will be checked first, and an appropriate one returned if possible. If not, the Font logic should resolve the TypeFace and TypeFaceFamily if possible, create a Font object, and return it.

Resources
Type 1 Fonts
  • Adobe Type 1 Font Format
  • According to the Adobe web site, the documentation for the font metrics files (.pfm = printer font metrics) is written and controlled by Microsoft, since it is actually a workaround to allow Type 1 fonts to be used on a GUI screen in Windows. However, the document does not appear to be on the Microsoft web site. The best resource for this information is Adobe Technical Note #5178: Building PFM Files for Postscript-Language CJK Fonts
  • FOP does not currently use the Adobe Font Metrics file, but the specification can be found in Adobe Technical Note #5004: Adobe Font Metrics File Format Specification
  • Adobe Technical Note #5040: Supporting Downloadable Postscript Language Fonts may also include some useful information.
TrueType Fonts
  • The TrueType specification
OpenType Fonts
  • The OpenType specification
  • The Adobe Introduction to OpenType fonts page has some useful general information and links.