![]() |
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 org.icepdf.core.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 org.icepdf.core.ri.util.
If you want to specify additional font path to be ready by the 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-2009. ICEsoft Technologies, Inc. |