TOC PREV NEXT INDEX




Font Management


ICEpdf uses a font manager to manage fonts that exist on the host operating system. The FontManager class can be found in the package com.icesoft.pdf.fonts. When the font manager's readSystemFonts() method is called, it tries to read all fonts on the host operating system and stores the name, family and path information of the readable font. The reading of all font programs can be time consuming and in most usage scenarios needs only to be done once as operating system fonts do not change regularly. As a result, the manager can import and export the collected font information using the getFontProperties() and setFontProperties() methods respectively. A basic FontPropertiesManager class is available in the package com.icesoft.pdf.ri.util.

The FontManager uses the following predefined paths to common operating system font paths:

Windows
Mac OS X
Linux and Solaris
Java Core Fonts
Adding Font Paths to the FontManager

If your operating system uses different font paths than those specified above or if you want to add additional font paths that can be read by the FontManager class, it is possible using the readSystemFonts() method. The following code demonstrates how to add more font paths to the FontManager internal list of paths:

String[] extraFontPaths = new String[]{"f:\\windows\\fonts\\", 
 
											"f:\\winnt\\fonts\\"};
 
FontManager fontManager = FontManager.getInstance();
 
fontManager.readSystemFonts(extraFontPaths);
 


Copyright 2005-2007. ICEsoft Technologies, Inc.
http://www.icesoft.com

TOC PREV NEXT INDEX