HiraokaHyperTools.iTextSharp-LGPL  0.2.5
iTextSharp.text.FontFactoryImp Class Reference

If you are using True Type fonts, you can declare the paths of the different ttf- and ttc-files to this class first and then create fonts in your code using one of the getFont method without having to enter a path as parameter. More...

Public Member Functions

 FontFactoryImp ()
 Creates new FontFactory More...
 
virtual Font GetFont (string fontname, string encoding, bool embedded, float size, int style, Color color)
 Constructs a Font-object. More...
 
virtual Font GetFont (string fontname, string encoding, bool embedded, float size, int style, Color color, bool cached)
 Constructs a Font-object. More...
 
virtual Font GetFont (Properties attributes)
 Constructs a Font-object. More...
 
Font GetFont (string fontname, string encoding, bool embedded, float size, int style)
 Constructs a Font-object. More...
 
virtual Font GetFont (string fontname, string encoding, bool embedded, float size)
 Constructs a Font-object. More...
 
virtual Font GetFont (string fontname, string encoding, bool embedded)
 Constructs a Font-object. More...
 
virtual Font GetFont (string fontname, string encoding, float size, int style, Color color)
 Constructs a Font-object. More...
 
virtual Font GetFont (string fontname, string encoding, float size, int style)
 Constructs a Font-object. More...
 
virtual Font GetFont (string fontname, string encoding, float size)
 Constructs a Font-object. More...
 
virtual Font GetFont (string fontname, string encoding)
 Constructs a Font-object. More...
 
virtual Font GetFont (string fontname, float size, int style, Color color)
 Constructs a Font-object. More...
 
virtual Font GetFont (string fontname, float size, Color color)
 Constructs a Font-object. More...
 
virtual Font GetFont (string fontname, float size, int style)
 Constructs a Font-object. More...
 
virtual Font GetFont (string fontname, float size)
 Constructs a Font-object. More...
 
virtual Font GetFont (string fontname)
 Constructs a Font-object. More...
 
virtual void Register (Properties attributes)
 
void RegisterFamily (String familyName, String fullName, String path)
 
virtual void Register (string path)
 Register a ttf- or a ttc-file. More...
 
virtual void Register (string path, string alias)
 Register a ttf- or a ttc-file and use an alias for the font contained in the ttf-file. More...
 
virtual int RegisterDirectory (String dir)
 
int RegisterDirectory (String dir, bool scanSubdirectories)
 
virtual int RegisterDirectories ()
 
virtual bool IsRegistered (string fontname)
 Checks if a certain font is registered. More...
 

Properties

virtual ICollection RegisteredFonts [get]
 Gets a set of registered fontnames. More...
 
virtual ICollection RegisteredFamilies [get]
 Gets a set of registered font families. More...
 
virtual string DefaultEncoding [get, set]
 
virtual bool DefaultEmbedding [get, set]
 

Detailed Description

If you are using True Type fonts, you can declare the paths of the different ttf- and ttc-files to this class first and then create fonts in your code using one of the getFont method without having to enter a path as parameter.

Constructor & Destructor Documentation

◆ FontFactoryImp()

iTextSharp.text.FontFactoryImp.FontFactoryImp ( )

Creates new FontFactory

Member Function Documentation

◆ GetFont() [1/15]

virtual Font iTextSharp.text.FontFactoryImp.GetFont ( Properties  attributes)
virtual

Constructs a Font-object.

Parameters
attributesthe attributes of a Font object
Returns
a Font object

◆ GetFont() [2/15]

virtual Font iTextSharp.text.FontFactoryImp.GetFont ( string  fontname)
virtual

Constructs a Font-object.

Parameters
fontnamethe name of the font
Returns
a Font object

◆ GetFont() [3/15]

virtual Font iTextSharp.text.FontFactoryImp.GetFont ( string  fontname,
float  size 
)
virtual

Constructs a Font-object.

Parameters
fontnamethe name of the font
sizethe size of this font
Returns
a Font object

◆ GetFont() [4/15]

virtual Font iTextSharp.text.FontFactoryImp.GetFont ( string  fontname,
float  size,
Color  color 
)
virtual

Constructs a Font-object.

Parameters
fontnamethe name of the font
sizethe size of this font
colorthe Color of this font
Returns
a Font object

◆ GetFont() [5/15]

virtual Font iTextSharp.text.FontFactoryImp.GetFont ( string  fontname,
float  size,
int  style 
)
virtual

Constructs a Font-object.

Parameters
fontnamethe name of the font
sizethe size of this font
stylethe style of this font
Returns
a Font object

◆ GetFont() [6/15]

virtual Font iTextSharp.text.FontFactoryImp.GetFont ( string  fontname,
float  size,
int  style,
Color  color 
)
virtual

Constructs a Font-object.

Parameters
fontnamethe name of the font
sizethe size of this font
stylethe style of this font
colorthe Color of this font
Returns
a Font object

◆ GetFont() [7/15]

virtual Font iTextSharp.text.FontFactoryImp.GetFont ( string  fontname,
string  encoding 
)
virtual

Constructs a Font-object.

Parameters
fontnamethe name of the font
encodingthe encoding of the font
Returns
a Font object

◆ GetFont() [8/15]

virtual Font iTextSharp.text.FontFactoryImp.GetFont ( string  fontname,
string  encoding,
bool  embedded 
)
virtual

Constructs a Font-object.

Parameters
fontnamethe name of the font
encodingthe encoding of the font
embeddedtrue if the font is to be embedded in the PDF
Returns
a Font object

◆ GetFont() [9/15]

virtual Font iTextSharp.text.FontFactoryImp.GetFont ( string  fontname,
string  encoding,
bool  embedded,
float  size 
)
virtual

Constructs a Font-object.

Parameters
fontnamethe name of the font
encodingthe encoding of the font
embeddedtrue if the font is to be embedded in the PDF
sizethe size of this font
Returns

◆ GetFont() [10/15]

Font iTextSharp.text.FontFactoryImp.GetFont ( string  fontname,
string  encoding,
bool  embedded,
float  size,
int  style 
)

Constructs a Font-object.

Parameters
fontnamethe name of the font
encodingthe encoding of the font
embeddedtrue if the font is to be embedded in the PDF
sizethe size of this font
stylethe style of this font
Returns
a Font object

◆ GetFont() [11/15]

virtual Font iTextSharp.text.FontFactoryImp.GetFont ( string  fontname,
string  encoding,
bool  embedded,
float  size,
int  style,
Color  color 
)
virtual

Constructs a Font-object.

Parameters
fontnamethe name of the font
encodingthe encoding of the font
embeddedtrue if the font is to be embedded in the PDF
sizethe size of this font
stylethe style of this font
colorthe Color of this font
Returns
a Font object

◆ GetFont() [12/15]

virtual Font iTextSharp.text.FontFactoryImp.GetFont ( string  fontname,
string  encoding,
bool  embedded,
float  size,
int  style,
Color  color,
bool  cached 
)
virtual

Constructs a Font-object.

Parameters
fontnamethe name of the font
encodingthe encoding of the font
embeddedtrue if the font is to be embedded in the PDF
sizethe size of this font
stylethe style of this font
colorthe Color of this font
cachedtrue if the font comes from the cache or is added to the cache if new, false if the font is always created new
Returns
a Font object

◆ GetFont() [13/15]

virtual Font iTextSharp.text.FontFactoryImp.GetFont ( string  fontname,
string  encoding,
float  size 
)
virtual

Constructs a Font-object.

Parameters
fontnamethe name of the font
encodingthe encoding of the font
sizethe size of this font
Returns
a Font object

◆ GetFont() [14/15]

virtual Font iTextSharp.text.FontFactoryImp.GetFont ( string  fontname,
string  encoding,
float  size,
int  style 
)
virtual

Constructs a Font-object.

Parameters
fontnamethe name of the font
encodingthe encoding of the font
sizethe size of this font
stylethe style of this font
Returns
a Font object

◆ GetFont() [15/15]

virtual Font iTextSharp.text.FontFactoryImp.GetFont ( string  fontname,
string  encoding,
float  size,
int  style,
Color  color 
)
virtual

Constructs a Font-object.

Parameters
fontnamethe name of the font
encodingthe encoding of the font
sizethe size of this font
stylethe style of this font
colorthe Color of this font
Returns
a Font object

◆ IsRegistered()

virtual bool iTextSharp.text.FontFactoryImp.IsRegistered ( string  fontname)
virtual

Checks if a certain font is registered.

Parameters
fontnamethe name of the font that has to be checked
Returns
true if the font is found

◆ Register() [1/3]

virtual void iTextSharp.text.FontFactoryImp.Register ( Properties  attributes)
virtual

◆ Register() [2/3]

virtual void iTextSharp.text.FontFactoryImp.Register ( string  path)
virtual

Register a ttf- or a ttc-file.

Parameters
paththe path to a ttf- or ttc-file

◆ Register() [3/3]

virtual void iTextSharp.text.FontFactoryImp.Register ( string  path,
string  alias 
)
virtual

Register a ttf- or a ttc-file and use an alias for the font contained in the ttf-file.

Parameters
paththe path to a ttf- or ttc-file
aliasthe alias you want to use for the font

◆ RegisterDirectories()

virtual int iTextSharp.text.FontFactoryImp.RegisterDirectories ( )
virtual

Register fonts in some probable directories. It usually works in Windows, Linux and Solaris.

Returns
the number of fonts registered

◆ RegisterDirectory() [1/2]

virtual int iTextSharp.text.FontFactoryImp.RegisterDirectory ( String  dir)
virtual

Register all the fonts in a directory.

Parameters
dirthe directory
Returns
the number of fonts registered

◆ RegisterDirectory() [2/2]

int iTextSharp.text.FontFactoryImp.RegisterDirectory ( String  dir,
bool  scanSubdirectories 
)

Register all the fonts in a directory and possibly its subdirectories.

Parameters
dirthe directory
scanSubdirectoriesrecursively scan subdirectories if true</true>
Returns
the number of fonts registered
Since
2.1.2

◆ RegisterFamily()

void iTextSharp.text.FontFactoryImp.RegisterFamily ( String  familyName,
String  fullName,
String  path 
)

Register a font by giving explicitly the font family and name.

Parameters
familyNamethe font family
fullNamethe font name
paththe font path

Property Documentation

◆ DefaultEmbedding

virtual bool iTextSharp.text.FontFactoryImp.DefaultEmbedding
getset

◆ DefaultEncoding

virtual string iTextSharp.text.FontFactoryImp.DefaultEncoding
getset

◆ RegisteredFamilies

virtual ICollection iTextSharp.text.FontFactoryImp.RegisteredFamilies
get

Gets a set of registered font families.

a set of registered font families

◆ RegisteredFonts

virtual ICollection iTextSharp.text.FontFactoryImp.RegisteredFonts
get

Gets a set of registered fontnames.

a set of registered fontnames


The documentation for this class was generated from the following file: