java.lang.Object
com.lowagie.text.FontFactory
Deprecated.
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.
- Author:
- Bruno Lowagie
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated.This is a possible value of a base 14 type 1 fontstatic final StringDeprecated.This is a possible value of a base 14 type 1 fontstatic final StringDeprecated.This is a possible value of a base 14 type 1 fontstatic final StringDeprecated.This is a possible value of a base 14 type 1 fontstatic booleanDeprecated.This is the default value of the embedded variable.static StringDeprecated.This is the default encoding to use.static final StringDeprecated.This is a possible value of a base 14 type 1 fontstatic final StringDeprecated.This is a possible value of a base 14 type 1 fontstatic final StringDeprecated.This is a possible value of a base 14 type 1 fontstatic final StringDeprecated.This is a possible value of a base 14 type 1 fontstatic final StringDeprecated.This is a possible value of a base 14 type 1 fontstatic final StringDeprecated.This is a possible value of a base 14 type 1 fontstatic final StringDeprecated.This is a possible value of a base 14 type 1 fontstatic final StringDeprecated.This is a possible value of a base 14 type 1 fontstatic final StringDeprecated.This is a possible value of a base 14 type 1 fontstatic final StringDeprecated.This is a possible value of a base 14 type 1 fontstatic final StringDeprecated.This is a possible value of a base 14 type 1 font -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanDeprecated.Gets a set of registered fontnames.static FontDeprecated.Constructs aFont-object.static FontDeprecated.Constructs aFont-object.static FontDeprecated.Constructs aFont-object.static FontDeprecated.Constructs aFont-object.static FontDeprecated.Constructs aFont-object.static FontDeprecated.Constructs aFont-object.static FontDeprecated.Constructs aFont-object.static FontDeprecated.Constructs aFont-object.static FontDeprecated.Constructs aFont-object.static FontDeprecated.Constructs aFont-object.static FontgetFont(String fontname, String encoding, boolean embedded, float size, int style, Color color, boolean cached) Deprecated.Constructs aFont-object.static FontDeprecated.Constructs aFont-object.static FontDeprecated.Constructs aFont-object.static FontDeprecated.Constructs aFont-object.static FontgetFont(Properties attributes) Deprecated.Constructs aFont-object.static FontFactoryImpDeprecated.Gets the font factory implementation.Deprecated.Gets a set of registered fontnames.Deprecated.Gets a set of registered fontnames.static booleanisRegistered(String fontname) Deprecated.Checks if a certain font is registered.static voidDeprecated.Register a ttf- or a ttc-file.static voidDeprecated.Register a font file and use an alias for the font contained in it.static intDeprecated.Register fonts in some probable directories.static intregisterDirectory(String dir) Deprecated.Register all the fonts in a directory.static intregisterDirectory(String dir, boolean scanSubdirectories) Deprecated.Register all the fonts in a directory and possibly its subdirectories.voidregisterFamily(String familyName, String fullName, String path) Deprecated.Register a font by giving explicitly the font family and name.static voidsetFontImp(FontFactoryImp fontImp) Deprecated.Sets the font factory implementation.
-
Field Details
-
COURIER
Deprecated.This is a possible value of a base 14 type 1 font- See Also:
-
COURIER_BOLD
Deprecated.This is a possible value of a base 14 type 1 font- See Also:
-
COURIER_OBLIQUE
Deprecated.This is a possible value of a base 14 type 1 font- See Also:
-
COURIER_BOLDOBLIQUE
Deprecated.This is a possible value of a base 14 type 1 font- See Also:
-
HELVETICA
Deprecated.This is a possible value of a base 14 type 1 font- See Also:
-
HELVETICA_BOLD
Deprecated.This is a possible value of a base 14 type 1 font- See Also:
-
HELVETICA_OBLIQUE
Deprecated.This is a possible value of a base 14 type 1 font- See Also:
-
HELVETICA_BOLDOBLIQUE
Deprecated.This is a possible value of a base 14 type 1 font- See Also:
-
SYMBOL
Deprecated.This is a possible value of a base 14 type 1 font- See Also:
-
TIMES
Deprecated.This is a possible value of a base 14 type 1 font- See Also:
-
TIMES_ROMAN
Deprecated.This is a possible value of a base 14 type 1 font- See Also:
-
TIMES_BOLD
Deprecated.This is a possible value of a base 14 type 1 font- See Also:
-
TIMES_ITALIC
Deprecated.This is a possible value of a base 14 type 1 font- See Also:
-
TIMES_BOLDITALIC
Deprecated.This is a possible value of a base 14 type 1 font- See Also:
-
ZAPFDINGBATS
Deprecated.This is a possible value of a base 14 type 1 font- See Also:
-
defaultEncoding
Deprecated.This is the default encoding to use. -
defaultEmbedding
public static boolean defaultEmbeddingDeprecated.This is the default value of the embedded variable.
-
-
Method Details
-
getFont
public static Font getFont(String fontname, String encoding, boolean embedded, float size, int style, Color color) Deprecated.Constructs aFont-object.- Parameters:
fontname- the name of the fontencoding- the encoding of the fontembedded- true if the font is to be embedded in the PDFsize- the size of this fontstyle- the style of this fontcolor- theColorof this font.- Returns:
- the Font constructed based on the parameters
-
getFont
public static Font getFont(String fontname, String encoding, boolean embedded, float size, int style, Color color, boolean cached) Deprecated.Constructs aFont-object.- Parameters:
fontname- the name of the fontencoding- the encoding of the fontembedded- true if the font is to be embedded in the PDFsize- the size of this fontstyle- the style of this fontcolor- theColorof this font.cached- true if the font comes from the cache or is added to the cache if new, false if the font is always created new- Returns:
- the Font constructed based on the parameters
-
getFont
Deprecated.Constructs aFont-object.- Parameters:
attributes- the attributes of aFontobject.- Returns:
- the Font constructed based on the attributes
-
getFont
public static Font getFont(String fontname, String encoding, boolean embedded, float size, int style) Deprecated.Constructs aFont-object.- Parameters:
fontname- the name of the fontencoding- the encoding of the fontembedded- true if the font is to be embedded in the PDFsize- the size of this fontstyle- the style of this font- Returns:
- the Font constructed based on the parameters
-
getFont
Deprecated.Constructs aFont-object.- Parameters:
fontname- the name of the fontencoding- the encoding of the fontembedded- true if the font is to be embedded in the PDFsize- the size of this font- Returns:
- the Font constructed based on the parameters
-
getFont
Deprecated.Constructs aFont-object.- Parameters:
fontname- the name of the fontencoding- the encoding of the fontembedded- true if the font is to be embedded in the PDF- Returns:
- the Font constructed based on the parameters
-
getFont
Deprecated.Constructs aFont-object.- Parameters:
fontname- the name of the fontencoding- the encoding of the fontsize- the size of this fontstyle- the style of this fontcolor- theColorof this font.- Returns:
- the Font constructed based on the parameters
-
getFont
Deprecated.Constructs aFont-object.- Parameters:
fontname- the name of the fontencoding- the encoding of the fontsize- the size of this fontstyle- the style of this font- Returns:
- the Font constructed based on the parameters
-
getFont
Deprecated.Constructs aFont-object.- Parameters:
fontname- the name of the fontencoding- the encoding of the fontsize- the size of this font- Returns:
- the Font constructed based on the parameters
-
getFont
Deprecated.Constructs aFont-object.- Parameters:
fontname- the name of the fontencoding- the encoding of the font- Returns:
- the Font constructed based on the parameters
-
getFont
Deprecated.Constructs aFont-object.- Parameters:
fontname- the name of the fontsize- the size of this fontstyle- the style of this fontcolor- theColorof this font.- Returns:
- the Font constructed based on the parameters
-
getFont
Deprecated.Constructs aFont-object.- Parameters:
fontname- the name of the fontsize- the size of this fontcolor- theColorof this font.- Returns:
- the Font constructed based on the parameters
- Since:
- 2.1.0
-
getFont
Deprecated.Constructs aFont-object.- Parameters:
fontname- the name of the fontsize- the size of this fontstyle- the style of this font- Returns:
- the Font constructed based on the parameters
-
getFont
Deprecated.Constructs aFont-object.- Parameters:
fontname- the name of the fontsize- the size of this font- Returns:
- the Font constructed based on the parameters
-
getFont
Deprecated.Constructs aFont-object.- Parameters:
fontname- the name of the font- Returns:
- the Font constructed based on the parameters
-
register
Deprecated.Register a ttf- or a ttc-file.- Parameters:
path- the path to a ttf- or ttc-file
-
register
Deprecated.Register a font file and use an alias for the font contained in it.- Parameters:
path- the path to a font filealias- the alias you want to use for the font
-
registerDirectory
Deprecated.Register all the fonts in a directory.- Parameters:
dir- the directory- Returns:
- the number of fonts registered
-
registerDirectory
Deprecated.Register all the fonts in a directory and possibly its subdirectories.- Parameters:
dir- the directoryscanSubdirectories- recursively scan subdirectories iftrue- Returns:
- the number of fonts registered
- Since:
- 2.1.2
-
registerDirectories
public static int registerDirectories()Deprecated.Register fonts in some probable directories. It usually works in Windows, Linux and Solaris.- Returns:
- the number of fonts registered
-
getRegisteredFonts
Deprecated.Gets a set of registered fontnames.- Returns:
- a set of registered fonts
-
getRegisteredFamilies
Deprecated.Gets a set of registered fontnames.- Returns:
- a set of registered font families
-
contains
Deprecated.Gets a set of registered fontnames.- Parameters:
fontname- of a font that may or may not be registered- Returns:
- true if a given font is registered
-
isRegistered
Deprecated.Checks if a certain font is registered.- Parameters:
fontname- the name of the font that has to be checked.- Returns:
- true if the font is found
-
getFontImp
Deprecated.Gets the font factory implementation.- Returns:
- the font factory implementation
-
setFontImp
Deprecated.Sets the font factory implementation.- Parameters:
fontImp- the font factory implementation
-
registerFamily
Deprecated.Register a font by giving explicitly the font family and name.- Parameters:
familyName- the font familyfullName- the font namepath- the font path
-