intarsys PDF library API

de.intarsys.pdf.font.outlet
Class StandardFontFactory

java.lang.Object
  extended by de.intarsys.pdf.font.outlet.StandardFontFactory
All Implemented Interfaces:
IFontFactory
Direct Known Subclasses:
DocumentFontFactory

public class StandardFontFactory
extends Object
implements IFontFactory

The standard factory managing and creating fonts.

This one relies on the building blocks for fonts defined in "de.intarsys.afm" and "de.intarsys.truetype".

The factory tries first to resolve the request within the cache of already loaded fonts. If not found, first Type1 (AFM), then TrueType fonts are looked up.

Remember to properly set up the according registries if you want to access non standard fonts.


Method Summary
 PDFont getBoldFlavor(PDFont font)
          A font based on font, but with "bold" style.
 PDFont getFont(IFontQuery query)
          A font satisfying the conditions defined in query.
 PDFont getItalicFlavor(PDFont font)
          A font based on font, but with "italic" style.
 PDFont getRegularFlavor(PDFont font)
          A font based on font, but with "regular" style.
 void setEmbedNew(boolean embedNew)
          Flag if the factory should create fonts that are embedded in the document.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getBoldFlavor

public PDFont getBoldFlavor(PDFont font)
Description copied from interface: IFontFactory
A font based on font, but with "bold" style.

The font returned may be either a new one or a font already in use in a PDDocument. Thois decision is up to the factory.Be careful when changing the font returned!

Specified by:
getBoldFlavor in interface IFontFactory
Parameters:
font - The base font to be "bolded".
Returns:
A font based on font, but with "bold" style.

setEmbedNew

public void setEmbedNew(boolean embedNew)
Description copied from interface: IFontFactory
Flag if the factory should create fonts that are embedded in the document.

Specified by:
setEmbedNew in interface IFontFactory
Parameters:
embedNew - true if new fonts should be embedded.

getFont

public PDFont getFont(IFontQuery query)
Description copied from interface: IFontFactory
A font satisfying the conditions defined in query.

The font returned may be either a new one or a font already in use in a PDDocument. Thois decision is up to the factory.Be careful when changing the font returned!

Specified by:
getFont in interface IFontFactory
Parameters:
query - A query defining the PDFont to be looked up.
Returns:
A font satisfying the conditions defined in query.

getItalicFlavor

public PDFont getItalicFlavor(PDFont font)
Description copied from interface: IFontFactory
A font based on font, but with "italic" style.

The font returned may be either a new one or a font already in use in a PDDocument. Thois decision is up to the factory.Be careful when changing the font returned!

Specified by:
getItalicFlavor in interface IFontFactory
Parameters:
font - The base font to be "italicized".
Returns:
A font based on font, but with "italic" style.

getRegularFlavor

public PDFont getRegularFlavor(PDFont font)
Description copied from interface: IFontFactory
A font based on font, but with "regular" style.

The font returned may be either a new one or a font already in use in a PDDocument. Thois decision is up to the factory.Be careful when changing the font returned!

Specified by:
getRegularFlavor in interface IFontFactory
Parameters:
font - The base font to be "regularized".
Returns:
A font based on font, but with "regular" style.

intarsys PDF library API

Copyright © 2006 intarsys consulting GmbH. All Rights Reserved.