Home » iText-2.1.7 » com.lowagie » text » [javadoc | source]
com.lowagie.text
public final class: FontFactory [javadoc | source]
java.lang.Object
   com.lowagie.text.FontFactory
If you are using True Type fonts, you can declare the paths of the different ttf- and ttc-files to this static class first and then create fonts in your code using one of the static getFont-method without having to enter a path as parameter.
Field Summary
public static final  String COURIER    This is a possible value of a base 14 type 1 font 
public static final  String COURIER_BOLD    This is a possible value of a base 14 type 1 font 
public static final  String COURIER_OBLIQUE    This is a possible value of a base 14 type 1 font 
public static final  String COURIER_BOLDOBLIQUE    This is a possible value of a base 14 type 1 font 
public static final  String HELVETICA    This is a possible value of a base 14 type 1 font 
public static final  String HELVETICA_BOLD    This is a possible value of a base 14 type 1 font 
public static final  String HELVETICA_OBLIQUE    This is a possible value of a base 14 type 1 font 
public static final  String HELVETICA_BOLDOBLIQUE    This is a possible value of a base 14 type 1 font 
public static final  String SYMBOL    This is a possible value of a base 14 type 1 font 
public static final  String TIMES    This is a possible value of a base 14 type 1 font 
public static final  String TIMES_ROMAN    This is a possible value of a base 14 type 1 font 
public static final  String TIMES_BOLD    This is a possible value of a base 14 type 1 font 
public static final  String TIMES_ITALIC    This is a possible value of a base 14 type 1 font 
public static final  String TIMES_BOLDITALIC    This is a possible value of a base 14 type 1 font 
public static final  String ZAPFDINGBATS    This is a possible value of a base 14 type 1 font 
public static  String defaultEncoding    This is the default encoding to use. 
public static  boolean defaultEmbedding    This is the default value of the embedded variable. 
Method from com.lowagie.text.FontFactory Summary:
contains,   getFont,   getFont,   getFont,   getFont,   getFont,   getFont,   getFont,   getFont,   getFont,   getFont,   getFont,   getFont,   getFont,   getFont,   getFont,   getFontImp,   getRegisteredFamilies,   getRegisteredFonts,   isRegistered,   register,   register,   registerDirectories,   registerDirectory,   registerDirectory,   registerFamily,   setFontImp
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.lowagie.text.FontFactory Detail:
 public static boolean contains(String fontname) 
    Gets a set of registered fontnames.
 public static Font getFont(Properties attributes) 
    Constructs a Font-object.
 public static Font getFont(String fontname) 
    Constructs a Font-object.
 public static Font getFont(String fontname,
    String encoding) 
    Constructs a Font-object.
 public static Font getFont(String fontname,
    float size) 
    Constructs a Font-object.
 public static Font getFont(String fontname,
    String encoding,
    boolean embedded) 
    Constructs a Font-object.
 public static Font getFont(String fontname,
    String encoding,
    float size) 
    Constructs a Font-object.
 public static Font getFont(String fontname,
    float size,
    Color color) 
    Constructs a Font-object.
 public static Font getFont(String fontname,
    float size,
    int style) 
    Constructs a Font-object.
 public static Font getFont(String fontname,
    String encoding,
    boolean embedded,
    float size) 
    Constructs a Font-object.
 public static Font getFont(String fontname,
    String encoding,
    float size,
    int style) 
    Constructs a Font-object.
 public static Font getFont(String fontname,
    float size,
    int style,
    Color color) 
    Constructs a Font-object.
 public static Font getFont(String fontname,
    String encoding,
    boolean embedded,
    float size,
    int style) 
    Constructs a Font-object.
 public static Font getFont(String fontname,
    String encoding,
    float size,
    int style,
    Color color) 
    Constructs a Font-object.
 public static Font getFont(String fontname,
    String encoding,
    boolean embedded,
    float size,
    int style,
    Color color) 
    Constructs a Font-object.
 public static Font getFont(String fontname,
    String encoding,
    boolean embedded,
    float size,
    int style,
    Color color,
    boolean cached) 
    Constructs a Font-object.
 public static FontFactoryImp getFontImp() 
    Gets the font factory implementation.
 public static Set getRegisteredFamilies() 
    Gets a set of registered fontnames.
 public static Set getRegisteredFonts() 
    Gets a set of registered fontnames.
 public static boolean isRegistered(String fontname) 
    Checks if a certain font is registered.
 public static  void register(String path) 
    Register a ttf- or a ttc-file.
 public static  void register(String path,
    String alias) 
    Register a font file and use an alias for the font contained in it.
 public static int registerDirectories() 
    Register fonts in some probable directories. It usually works in Windows, Linux and Solaris.
 public static int registerDirectory(String dir) 
    Register all the fonts in a directory.
 public static int registerDirectory(String dir,
    boolean scanSubdirectories) 
    Register all the fonts in a directory and possibly its subdirectories.
 public  void registerFamily(String familyName,
    String fullName,
    String path) 
    Register a font by giving explicitly the font family and name.
 public static  void setFontImp(FontFactoryImp fontImp) 
    Sets the font factory implementation.