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

Contains all the specifications of a font: fontfamily, size, style and color. More...

Inheritance diagram for iTextSharp.text.Font:
iTextSharp.text.rtf.style.RtfFont iTextSharp.text.rtf.style.RtfParagraphStyle

Public Member Functions

 Font (Font other)
 
 Font (int family, float size, int style, Color color)
 Constructs a Font. More...
 
 Font (BaseFont bf, float size, int style, Color color)
 Constructs a Font. More...
 
 Font (BaseFont bf, float size, int style)
 Constructs a Font. More...
 
 Font (BaseFont bf, float size)
 Constructs a Font. More...
 
 Font (BaseFont bf)
 Constructs a Font. More...
 
 Font (int family, float size, int style)
 Constructs a Font. More...
 
 Font (int family, float size)
 Constructs a Font. More...
 
 Font (int family)
 Constructs a Font. More...
 
 Font ()
 Constructs a Font. More...
 
virtual int CompareTo (Object obj)
 Compares this Font with another More...
 
virtual void SetFamily (String family)
 Sets the family using a String ("Courier", "Helvetica", "Times New Roman", "Symbol" or "ZapfDingbats"). More...
 
float GetCalculatedLeading (float linespacing)
 
bool IsBold ()
 checks if this font is Bold. More...
 
bool IsItalic ()
 checks if this font is Bold. More...
 
bool IsUnderlined ()
 checks if this font is underlined. More...
 
bool IsStrikethru ()
 checks if the style of this font is STRIKETHRU. More...
 
virtual void SetStyle (String style)
 Sets the style using a String containing one of more of the following values: normal, bold, italic, underline, strike. More...
 
virtual void SetStyle (int style)
 
virtual void SetColor (int red, int green, int blue)
 Sets the color. More...
 
BaseFont GetCalculatedBaseFont (bool specialEncoding)
 
virtual bool IsStandardFont ()
 Checks if the properties of this font are undefined or null. If so, the standard should be used. More...
 
virtual Font Difference (Font font)
 Replaces the attributes that are equal to null with the attributes of a given font. More...
 

Static Public Member Functions

static int GetFamilyIndex (string family)
 Translates a string-value of a certain family into the index that is used for this family in this class. More...
 
static int GetStyleValue (string style)
 Translates a string-value of a certain style into the index value is used for this style in this class. More...
 

Static Public Attributes

const int COURIER = 0
 a possible value of a font family. More...
 
const int HELVETICA = 1
 a possible value of a font family. More...
 
const int TIMES_ROMAN = 2
 a possible value of a font family. More...
 
const int SYMBOL = 3
 a possible value of a font family. More...
 
const int ZAPFDINGBATS = 4
 a possible value of a font family. More...
 
const int NORMAL = 0
 this is a possible style. More...
 
const int BOLD = 1
 this is a possible style. More...
 
const int ITALIC = 2
 this is a possible style. More...
 
const int UNDERLINE = 4
 this is a possible style. More...
 
const int STRIKETHRU = 8
 this is a possible style. More...
 
const int BOLDITALIC = BOLD | ITALIC
 this is a possible style. More...
 
const int UNDEFINED = -1
 the value of an undefined attribute. More...
 
const int DEFAULTSIZE = 12
 the value of the default size. More...
 

Properties

int Family [get]
 Gets the family of this font. More...
 
virtual string Familyname [get]
 Gets the familyname as a string. More...
 
virtual float Size [get, set]
 Get/set the size of this font. More...
 
float CalculatedSize [get]
 
int Style [get]
 Gets the style of this font. More...
 
int CalculatedStyle [get]
 
virtual Color Color [get, set]
 Get/set the color of this font. More...
 
BaseFont BaseFont [get]
 Gets the BaseFont inside this object. More...
 

Detailed Description

Contains all the specifications of a font: fontfamily, size, style and color.

Paragraph p = new Paragraph("This is a paragraph",
<strong>new Font(Font.HELVETICA, 18, Font.BOLDITALIC, new Color(0, 0, 255))</strong>);
virtual Color Color
Get/set the color of this font.
Definition: Font.cs:521
Font()
Constructs a Font.
Definition: Font.cs:221
p
Definition: glyphlist.txt:2969

Constructor & Destructor Documentation

◆ Font() [1/10]

iTextSharp.text.Font.Font ( Font  other)

Copy constructor of a Font

Parameters
otherthe font that has to be copied

◆ Font() [2/10]

iTextSharp.text.Font.Font ( int  family,
float  size,
int  style,
Color  color 
)

Constructs a Font.

Parameters
familythe family to which this font belongs
sizethe size of this font
stylethe style of this font
colorthe Color of this font.

◆ Font() [3/10]

iTextSharp.text.Font.Font ( BaseFont  bf,
float  size,
int  style,
Color  color 
)

Constructs a Font.

Parameters
bfthe external font
sizethe size of this font
stylethe style of this font
colorthe Color of this font.

◆ Font() [4/10]

iTextSharp.text.Font.Font ( BaseFont  bf,
float  size,
int  style 
)

Constructs a Font.

Parameters
bfthe external font
sizethe size of this font
stylethe style of this font

◆ Font() [5/10]

iTextSharp.text.Font.Font ( BaseFont  bf,
float  size 
)

Constructs a Font.

Parameters
bfthe external font
sizethe size of this font

◆ Font() [6/10]

iTextSharp.text.Font.Font ( BaseFont  bf)

Constructs a Font.

Parameters
bfthe external font

◆ Font() [7/10]

iTextSharp.text.Font.Font ( int  family,
float  size,
int  style 
)

Constructs a Font.

Parameters
familythe family to which this font belongs
sizethe size of this font
stylethe style of this font

◆ Font() [8/10]

iTextSharp.text.Font.Font ( int  family,
float  size 
)

Constructs a Font.

Parameters
familythe family to which this font belongs
sizethe size of this font

◆ Font() [9/10]

iTextSharp.text.Font.Font ( int  family)

Constructs a Font.

Parameters
familythe family to which this font belongs

◆ Font() [10/10]

iTextSharp.text.Font.Font ( )

Constructs a Font.

<overloads> Has nine overloads. </overloads>

Member Function Documentation

◆ CompareTo()

virtual int iTextSharp.text.Font.CompareTo ( Object  obj)
virtual

Compares this Font with another

Parameters
objthe other Font
Returns
a value

Reimplemented in iTextSharp.text.rtf.style.RtfFont.

◆ Difference()

virtual Font iTextSharp.text.Font.Difference ( Font  font)
virtual

Replaces the attributes that are equal to null with the attributes of a given font.

Parameters
fontthe font of a bigger element class
Returns
a Font

Reimplemented in iTextSharp.text.rtf.style.RtfFont.

◆ GetCalculatedBaseFont()

BaseFont iTextSharp.text.Font.GetCalculatedBaseFont ( bool  specialEncoding)

Gets the BaseFont this class represents. For the built-in fonts a BaseFont is calculated.

Parameters
specialEncodingtrue to use the special encoding for Symbol and ZapfDingbats, false to always use Cp1252
Returns
the BaseFont this class represents

◆ GetCalculatedLeading()

float iTextSharp.text.Font.GetCalculatedLeading ( float  linespacing)

Gets the leading that can be used with this font.

Parameters
linespacinga certain linespacing
Returns
the height of a line

◆ GetFamilyIndex()

static int iTextSharp.text.Font.GetFamilyIndex ( string  family)
static

Translates a string-value of a certain family into the index that is used for this family in this class.

Parameters
familyA string representing a certain font-family
Returns
the corresponding index

◆ GetStyleValue()

static int iTextSharp.text.Font.GetStyleValue ( string  style)
static

Translates a string-value of a certain style into the index value is used for this style in this class.

Parameters
stylea string
Returns
the corresponding value

◆ IsBold()

bool iTextSharp.text.Font.IsBold ( )

checks if this font is Bold.

Returns
a boolean

◆ IsItalic()

bool iTextSharp.text.Font.IsItalic ( )

checks if this font is Bold.

Returns
a boolean

◆ IsStandardFont()

virtual bool iTextSharp.text.Font.IsStandardFont ( )
virtual

Checks if the properties of this font are undefined or null. If so, the standard should be used.

Returns
a boolean

Reimplemented in iTextSharp.text.rtf.style.RtfFont.

◆ IsStrikethru()

bool iTextSharp.text.Font.IsStrikethru ( )

checks if the style of this font is STRIKETHRU.

Returns
a boolean

◆ IsUnderlined()

bool iTextSharp.text.Font.IsUnderlined ( )

checks if this font is underlined.

Returns
a boolean

◆ SetColor()

virtual void iTextSharp.text.Font.SetColor ( int  red,
int  green,
int  blue 
)
virtual

Sets the color.

Parameters
redthe red-value of the new color
greenthe green-value of the new color
bluethe blue-value of the new color

Reimplemented in iTextSharp.text.rtf.style.RtfFont.

◆ SetFamily()

virtual void iTextSharp.text.Font.SetFamily ( String  family)
virtual

Sets the family using a String ("Courier", "Helvetica", "Times New Roman", "Symbol" or "ZapfDingbats").

Parameters
familyA String representing a certain font-family.

Reimplemented in iTextSharp.text.rtf.style.RtfFont.

◆ SetStyle() [1/2]

virtual void iTextSharp.text.Font.SetStyle ( int  style)
virtual

Sets the style.

Parameters
stylethe style.

Reimplemented in iTextSharp.text.rtf.style.RtfFont, and iTextSharp.text.rtf.style.RtfParagraphStyle.

◆ SetStyle() [2/2]

virtual void iTextSharp.text.Font.SetStyle ( String  style)
virtual

Sets the style using a String containing one of more of the following values: normal, bold, italic, underline, strike.

Parameters
styleA String representing a certain style.

Reimplemented in iTextSharp.text.rtf.style.RtfFont.

Member Data Documentation

◆ BOLD

const int iTextSharp.text.Font.BOLD = 1
static

this is a possible style.

◆ BOLDITALIC

const int iTextSharp.text.Font.BOLDITALIC = BOLD | ITALIC
static

this is a possible style.

◆ COURIER

const int iTextSharp.text.Font.COURIER = 0
static

a possible value of a font family.

◆ DEFAULTSIZE

const int iTextSharp.text.Font.DEFAULTSIZE = 12
static

the value of the default size.

◆ HELVETICA

const int iTextSharp.text.Font.HELVETICA = 1
static

a possible value of a font family.

◆ ITALIC

const int iTextSharp.text.Font.ITALIC = 2
static

this is a possible style.

◆ NORMAL

const int iTextSharp.text.Font.NORMAL = 0
static

this is a possible style.

◆ STRIKETHRU

const int iTextSharp.text.Font.STRIKETHRU = 8
static

this is a possible style.

◆ SYMBOL

const int iTextSharp.text.Font.SYMBOL = 3
static

a possible value of a font family.

◆ TIMES_ROMAN

const int iTextSharp.text.Font.TIMES_ROMAN = 2
static

a possible value of a font family.

◆ UNDEFINED

const int iTextSharp.text.Font.UNDEFINED = -1
static

the value of an undefined attribute.

◆ UNDERLINE

const int iTextSharp.text.Font.UNDERLINE = 4
static

this is a possible style.

◆ ZAPFDINGBATS

const int iTextSharp.text.Font.ZAPFDINGBATS = 4
static

a possible value of a font family.

Property Documentation

◆ BaseFont

BaseFont iTextSharp.text.Font.BaseFont
get

Gets the BaseFont inside this object.

the BaseFont

◆ CalculatedSize

float iTextSharp.text.Font.CalculatedSize
get

Gets the size that can be used with the calculated BaseFont.

Returns
the size that can be used with the calculated BaseFont

◆ CalculatedStyle

int iTextSharp.text.Font.CalculatedStyle
get

Gets the style that can be used with the calculated BaseFont.

Returns
the style that can be used with the calculated BaseFont

◆ Color

virtual Color iTextSharp.text.Font.Color
getset

Get/set the color of this font.

the color of this font

◆ Family

int iTextSharp.text.Font.Family
get

Gets the family of this font.

the value of the family

◆ Familyname

virtual string iTextSharp.text.Font.Familyname
get

Gets the familyname as a string.

the familyname

◆ Size

virtual float iTextSharp.text.Font.Size
getset

Get/set the size of this font.

the size of this font

◆ Style

int iTextSharp.text.Font.Style
get

Gets the style of this font.

the style of this font


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