Table of Contents

Class DocumentFont

Namespace
iTextSharp.text.pdf
Assembly
iTextSharp.LGPLv2.Core.dll
public class DocumentFont : BaseFont
Inheritance
DocumentFont
Inherited Members

Properties

AllNameEntries

Gets all the entries of the names-table. If it is a True Type font each array element will have {Name ID, Platform ID, Platform Encoding ID, Language ID, font name}. The interpretation of this values can be found in the Open Type specification, chapter 2, in the 'name' table. For the other fonts the array has a single element with {"4", "", "", "", font name}.

public override string[][] AllNameEntries { get; }

Property Value

string[][]

the full name of the font

FamilyFontName

Gets the family name of the font. If it is a True Type font each array element will have {Platform ID, Platform Encoding ID, Language ID, font name}. The interpretation of this values can be found in the Open Type specification, chapter 2, in the 'name' table. For the other fonts the array has a single element with {"", "", "", font name}.

public override string[][] FamilyFontName { get; }

Property Value

string[][]

the family name of the font

FullFontName

Gets the full name of the font. If it is a True Type font each array element will have {Platform ID, Platform Encoding ID, Language ID, font name}. The interpretation of this values can be found in the Open Type specification, chapter 2, in the 'name' table. For the other fonts the array has a single element with {"", "", "", font name}.

public override string[][] FullFontName { get; }

Property Value

string[][]

the full name of the font

PostscriptFontName

Gets the postscript font name.

public override string PostscriptFontName { get; set; }

Property Value

string

the postscript font name

Methods

CharExists(int)

public override bool CharExists(int c)

Parameters

c int

Returns

bool

GetCharBBox(int)

public override int[] GetCharBBox(int c)

Parameters

c int

Returns

int[]

GetFontDescriptor(int, float)

Gets the font parameter identified by key . Valid values for key are ASCENT , CAPHEIGHT , DESCENT , ITALICANGLE , BBOXLLX , BBOXLLY , BBOXURX and BBOXURY .

public override float GetFontDescriptor(int key, float fontSize)

Parameters

key int

the parameter to be extracted

fontSize float

the font size in points

Returns

float

the parameter in points

GetFullFontStream()

Always returns null. @since 2.1.3

public override PdfStream GetFullFontStream()

Returns

PdfStream

null

GetKerning(int, int)

Gets the kerning between two Unicode chars.

public override int GetKerning(int char1, int char2)

Parameters

char1 int

the first char

char2 int

the second char

Returns

int

the kerning to be applied

GetRawCharBBox(int, string)

protected override int[] GetRawCharBBox(int c, string name)

Parameters

c int
name string

Returns

int[]

GetWidth(int)

Gets the width of a char in normalized 1000 units.

public override int GetWidth(int char1)

Parameters

char1 int

the unicode char to get the width of

Returns

int

the width in normalized 1000 units

GetWidth(string)

public override int GetWidth(string text)

Parameters

text string

Returns

int

HasKernPairs()

Checks if the font has any kerning pairs.

public override bool HasKernPairs()

Returns

bool

true if the font has any kerning pairs

SetKerning(int, int, int)

public override bool SetKerning(int char1, int char2, int kern)

Parameters

char1 int
char2 int
kern int

Returns

bool