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

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. More...

Public Member Functions

void RegisterFamily (String familyName, String fullName, String path)
 

Static Public Member Functions

static Font GetFont (string fontname, string encoding, bool embedded, float size, int style, Color color)
 Constructs a Font-object. More...
 
static Font GetFont (string fontname, string encoding, bool embedded, float size, int style, Color color, bool cached)
 Constructs a Font-object. More...
 
static Font GetFont (Properties attributes)
 Constructs a Font-object. More...
 
static Font GetFont (string fontname, string encoding, bool embedded, float size, int style)
 Constructs a Font-object. More...
 
static Font GetFont (string fontname, string encoding, bool embedded, float size)
 Constructs a Font-object. More...
 
static Font GetFont (string fontname, string encoding, bool embedded)
 Constructs a Font-object. More...
 
static Font GetFont (string fontname, string encoding, float size, int style, Color color)
 Constructs a Font-object. More...
 
static Font GetFont (string fontname, string encoding, float size, int style)
 Constructs a Font-object. More...
 
static Font GetFont (string fontname, string encoding, float size)
 Constructs a Font-object. More...
 
static Font GetFont (string fontname, string encoding)
 Constructs a Font-object. More...
 
static Font GetFont (string fontname, float size, int style, Color color)
 Constructs a Font-object. More...
 
static Font GetFont (string fontname, float size, Color color)
 Constructs a Font-object. More...
 
static Font GetFont (string fontname, float size, int style)
 Constructs a Font-object. More...
 
static Font GetFont (string fontname, float size)
 Constructs a Font-object. More...
 
static Font GetFont (string fontname)
 Constructs a Font-object. More...
 
static void Register (Properties attributes)
 
static void Register (string path)
 Register a ttf- or a ttc-file. More...
 
static 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...
 
static int RegisterDirectory (String dir)
 
static int RegisterDirectory (String dir, bool scanSubdirectories)
 
static int RegisterDirectories ()
 
static bool Contains (string fontname)
 Checks whether the given font is contained within the object More...
 
static bool IsRegistered (string fontname)
 Checks if a certain font is registered. More...
 

Static Public Attributes

const string COURIER = BaseFont.COURIER
 This is a possible value of a base 14 type 1 font More...
 
const string COURIER_BOLD = BaseFont.COURIER_BOLD
 This is a possible value of a base 14 type 1 font More...
 
const string COURIER_OBLIQUE = BaseFont.COURIER_OBLIQUE
 This is a possible value of a base 14 type 1 font More...
 
const string COURIER_BOLDOBLIQUE = BaseFont.COURIER_BOLDOBLIQUE
 This is a possible value of a base 14 type 1 font More...
 
const string HELVETICA = BaseFont.HELVETICA
 This is a possible value of a base 14 type 1 font More...
 
const string HELVETICA_BOLD = BaseFont.HELVETICA_BOLD
 This is a possible value of a base 14 type 1 font More...
 
const string HELVETICA_OBLIQUE = BaseFont.HELVETICA_OBLIQUE
 This is a possible value of a base 14 type 1 font More...
 
const string HELVETICA_BOLDOBLIQUE = BaseFont.HELVETICA_BOLDOBLIQUE
 This is a possible value of a base 14 type 1 font More...
 
const string SYMBOL = BaseFont.SYMBOL
 This is a possible value of a base 14 type 1 font More...
 
const string TIMES = "Times"
 This is a possible value of a base 14 type 1 font More...
 
const string TIMES_ROMAN = BaseFont.TIMES_ROMAN
 This is a possible value of a base 14 type 1 font More...
 
const string TIMES_BOLD = BaseFont.TIMES_BOLD
 This is a possible value of a base 14 type 1 font More...
 
const string TIMES_ITALIC = BaseFont.TIMES_ITALIC
 This is a possible value of a base 14 type 1 font More...
 
const string TIMES_BOLDITALIC = BaseFont.TIMES_BOLDITALIC
 This is a possible value of a base 14 type 1 font More...
 
const string ZAPFDINGBATS = BaseFont.ZAPFDINGBATS
 This is a possible value of a base 14 type 1 font More...
 

Properties

static ICollection RegisteredFonts [get]
 Gets a set of registered fontnames. More...
 
static ICollection RegisteredFamilies [get]
 Gets a set of registered font families. More...
 
static string DefaultEncoding [get]
 
static bool DefaultEmbedding [get]
 
static FontFactoryImp FontImp [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 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.

Member Function Documentation

◆ Contains()

static bool iTextSharp.text.FontFactory.Contains ( string  fontname)
static

Checks whether the given font is contained within the object

Parameters
fontnamethe name of the font
Returns
true if font is contained within the object

◆ GetFont() [1/15]

static Font iTextSharp.text.FontFactory.GetFont ( Properties  attributes)
static

Constructs a Font-object.

Parameters
attributesthe attributes of a Font object
Returns
a Font object

◆ GetFont() [2/15]

static Font iTextSharp.text.FontFactory.GetFont ( string  fontname)
static

Constructs a Font-object.

Parameters
fontnamethe name of the font
Returns
a Font object

◆ GetFont() [3/15]

static Font iTextSharp.text.FontFactory.GetFont ( string  fontname,
float  size 
)
static

Constructs a Font-object.

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

◆ GetFont() [4/15]

static Font iTextSharp.text.FontFactory.GetFont ( string  fontname,
float  size,
Color  color 
)
static

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]

static Font iTextSharp.text.FontFactory.GetFont ( string  fontname,
float  size,
int  style 
)
static

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]

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

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]

static Font iTextSharp.text.FontFactory.GetFont ( string  fontname,
string  encoding 
)
static

Constructs a Font-object.

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

◆ GetFont() [8/15]

static Font iTextSharp.text.FontFactory.GetFont ( string  fontname,
string  encoding,
bool  embedded 
)
static

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]

static Font iTextSharp.text.FontFactory.GetFont ( string  fontname,
string  encoding,
bool  embedded,
float  size 
)
static

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]

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

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]

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

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]

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

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]

static Font iTextSharp.text.FontFactory.GetFont ( string  fontname,
string  encoding,
float  size 
)
static

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]

static Font iTextSharp.text.FontFactory.GetFont ( string  fontname,
string  encoding,
float  size,
int  style 
)
static

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]

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

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()

static bool iTextSharp.text.FontFactory.IsRegistered ( string  fontname)
static

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]

static void iTextSharp.text.FontFactory.Register ( Properties  attributes)
static

◆ Register() [2/3]

static void iTextSharp.text.FontFactory.Register ( string  path)
static

Register a ttf- or a ttc-file.

Parameters
paththe path to a ttf- or ttc-file

◆ Register() [3/3]

static void iTextSharp.text.FontFactory.Register ( string  path,
string  alias 
)
static

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()

static int iTextSharp.text.FontFactory.RegisterDirectories ( )
static

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

Returns
the number of fonts registered

◆ RegisterDirectory() [1/2]

static int iTextSharp.text.FontFactory.RegisterDirectory ( String  dir)
static

Register all the fonts in a directory.

Parameters
dirthe directory
Returns
the number of fonts registered

◆ RegisterDirectory() [2/2]

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

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.FontFactory.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

Member Data Documentation

◆ COURIER

const string iTextSharp.text.FontFactory.COURIER = BaseFont.COURIER
static

This is a possible value of a base 14 type 1 font

◆ COURIER_BOLD

const string iTextSharp.text.FontFactory.COURIER_BOLD = BaseFont.COURIER_BOLD
static

This is a possible value of a base 14 type 1 font

◆ COURIER_BOLDOBLIQUE

const string iTextSharp.text.FontFactory.COURIER_BOLDOBLIQUE = BaseFont.COURIER_BOLDOBLIQUE
static

This is a possible value of a base 14 type 1 font

◆ COURIER_OBLIQUE

const string iTextSharp.text.FontFactory.COURIER_OBLIQUE = BaseFont.COURIER_OBLIQUE
static

This is a possible value of a base 14 type 1 font

◆ HELVETICA

const string iTextSharp.text.FontFactory.HELVETICA = BaseFont.HELVETICA
static

This is a possible value of a base 14 type 1 font

◆ HELVETICA_BOLD

const string iTextSharp.text.FontFactory.HELVETICA_BOLD = BaseFont.HELVETICA_BOLD
static

This is a possible value of a base 14 type 1 font

◆ HELVETICA_BOLDOBLIQUE

const string iTextSharp.text.FontFactory.HELVETICA_BOLDOBLIQUE = BaseFont.HELVETICA_BOLDOBLIQUE
static

This is a possible value of a base 14 type 1 font

◆ HELVETICA_OBLIQUE

const string iTextSharp.text.FontFactory.HELVETICA_OBLIQUE = BaseFont.HELVETICA_OBLIQUE
static

This is a possible value of a base 14 type 1 font

◆ SYMBOL

const string iTextSharp.text.FontFactory.SYMBOL = BaseFont.SYMBOL
static

This is a possible value of a base 14 type 1 font

◆ TIMES

const string iTextSharp.text.FontFactory.TIMES = "Times"
static

This is a possible value of a base 14 type 1 font

◆ TIMES_BOLD

const string iTextSharp.text.FontFactory.TIMES_BOLD = BaseFont.TIMES_BOLD
static

This is a possible value of a base 14 type 1 font

◆ TIMES_BOLDITALIC

const string iTextSharp.text.FontFactory.TIMES_BOLDITALIC = BaseFont.TIMES_BOLDITALIC
static

This is a possible value of a base 14 type 1 font

◆ TIMES_ITALIC

const string iTextSharp.text.FontFactory.TIMES_ITALIC = BaseFont.TIMES_ITALIC
static

This is a possible value of a base 14 type 1 font

◆ TIMES_ROMAN

const string iTextSharp.text.FontFactory.TIMES_ROMAN = BaseFont.TIMES_ROMAN
static

This is a possible value of a base 14 type 1 font

◆ ZAPFDINGBATS

const string iTextSharp.text.FontFactory.ZAPFDINGBATS = BaseFont.ZAPFDINGBATS
static

This is a possible value of a base 14 type 1 font

Property Documentation

◆ DefaultEmbedding

bool iTextSharp.text.FontFactory.DefaultEmbedding
staticget

◆ DefaultEncoding

string iTextSharp.text.FontFactory.DefaultEncoding
staticget

◆ FontImp

FontFactoryImp iTextSharp.text.FontFactory.FontImp
staticgetset

◆ RegisteredFamilies

ICollection iTextSharp.text.FontFactory.RegisteredFamilies
staticget

Gets a set of registered font families.

a set of registered font families

◆ RegisteredFonts

ICollection iTextSharp.text.FontFactory.RegisteredFonts
staticget

Gets a set of registered fontnames.

a set of registered fontnames


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