ice.pilots.html4
Class FractionalDeviceFontProvider

java.lang.Object
  extended byice.pilots.html4.JavaFontProvider
      extended byice.pilots.html4.FractionalDeviceFontProvider
All Implemented Interfaces:
FontProvider

public class FractionalDeviceFontProvider
extends JavaFontProvider

This class implements the FontProvider interface to provide Font and FontMetrics information for devices that can provide different FontMetrics information than is available from the screen graphics device.

In practise, this means printing, or printing to PDF. For these devices, in the past, we have measured the text layout using integer font metrics, and used these measured text locations while printing to these devices. Sadly, rendering done in PDF and print devices typically uses Fractional font metrics, meaning that the text from adjacent <span> tags will typically overlap.

This class can be loaded via system property, and can provide immediate relief for situations where the user doesn't care about screen rendering, and is either printing only, or printing to PDF. In the future, the print mechanism may be enhanced to provide separate FontCache support for printing and for screen rendering.

Since:
6.1.1

Field Summary
 
Fields inherited from class ice.pilots.html4.JavaFontProvider
allFamilies, familyHash, genericToJava
 
Fields inherited from interface ice.pilots.html4.FontProvider
JAVA_VM
 
Constructor Summary
FractionalDeviceFontProvider()
          Constructor for the FractionalDeviceFontProvider instance.
 
Method Summary
 FontMetrics getFontMetrics(Font font)
          Retrieve the FontMetrics object for this class in a way that works on headless systems.
 
Methods inherited from class ice.pilots.html4.JavaFontProvider
getFont, getFontFamilies, init, initJava1Fonts, initJava2Fonts, isFamilySupported
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FractionalDeviceFontProvider

public FractionalDeviceFontProvider()
Constructor for the FractionalDeviceFontProvider instance.

Method Detail

getFontMetrics

public FontMetrics getFontMetrics(Font font)
Retrieve the FontMetrics object for this class in a way that works on headless systems.

Specified by:
getFontMetrics in interface FontProvider
Overrides:
getFontMetrics in class JavaFontProvider
Parameters:
font - The Font class to obtain the FontMetrics for
Returns:
The FontMetrics object describing this Font