From 8c66a2d30614dc01819f689569e12b9d2c7a8015 Mon Sep 17 00:00:00 2001 From: Keiron Liddle Date: Wed, 20 Nov 2002 09:55:49 +0000 Subject: [PATCH] new dev fonts.xml file to store some useful links and information about font work Submitted By: Victor Mote git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@195572 13f79535-47bb-0310-9956-ffa450edef68 --- src/documentation/content/xdocs/dev/book.xml | 1 + src/documentation/content/xdocs/dev/fonts.xml | 73 +++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 src/documentation/content/xdocs/dev/fonts.xml diff --git a/src/documentation/content/xdocs/dev/book.xml b/src/documentation/content/xdocs/dev/book.xml index 7d4a73c43..74e016c4d 100644 --- a/src/documentation/content/xdocs/dev/book.xml +++ b/src/documentation/content/xdocs/dev/book.xml @@ -21,6 +21,7 @@ + diff --git a/src/documentation/content/xdocs/dev/fonts.xml b/src/documentation/content/xdocs/dev/fonts.xml new file mode 100644 index 000000000..48207d7bd --- /dev/null +++ b/src/documentation/content/xdocs/dev/fonts.xml @@ -0,0 +1,73 @@ + + + + + + +
+ Fonts (Developer Information) +
+ +
+ Goals +
    +
  • refactor existing font logic for better clarity and to reduce duplication
  • +
  • parse registered font metric information on-the-fly (to make sure most up-to-date parsing is used??)
  • +
  • resolve whether the FontBBox, StemV, and ItalicAngle font metric information is important or not -- if so, parse the .pfb file to extract it when building the FOP xml metric file
  • +
  • handle fonts registered at the operating system (through AWT)
  • +
  • add support for parsing OpenType fonts
  • +
+
+
+ Issues +
    +
  • Why are we using our own font metric parsing and registration system, instead of the AWT system provided as part of Java? +
      +
    • Answer 1: Many of our customers use FOP in a so-called "headless" server environment -- that is, the operating system is operating in character mode, with no concept of a graphical environment. We need some mechanism of allowing these environments to get font information.
    • +
    • Answer 2: At some level, we don't yet fully trust AWT to handle fonts correctly. There are still unresolved discrepancies between the two systems.
    • +
    +
  • +
+
+
+ Implementation +

There are two main font functions needed within FOP:

+
    +
  • provision of a font object to be used in layout
  • +
  • embedding of a font file in output (such as PDF)
  • +
+

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.
  • +
+
+
+ +
+ + -- 2.39.5