Table of Contents

Class FontDetails

Namespace
iTextSharp.text.pdf
Assembly
iTextSharp.LGPLv2.Core.dll

Each font in the document will have an instance of this class where the characters used will be represented. @author Paulo Soares (psoares@consiste.pt)

public class FontDetails
Inheritance
FontDetails
Inherited Members

Constructors

FontDetails(PdfName, PdfIndirectReference, BaseFont)

Each font used in a document has an instance of this class. This class stores the characters used in the document and other specifics unique to the current working document.

public FontDetails(PdfName fontName, PdfIndirectReference indirectReference, BaseFont baseFont)

Parameters

fontName PdfName

the font name

indirectReference PdfIndirectReference

the indirect reference to the font

baseFont BaseFont

the BaseFont

Fields

subset

Indicates if all the glyphs and widths for that particular encoding should be included in the document.

protected bool subset

Field Value

bool

Properties

BaseFont

Gets the BaseFont of this font.

public BaseFont BaseFont { get; }

Property Value

BaseFont

the BaseFont of this font

FontName

Gets the font name as it appears in the document body.

public PdfName FontName { get; }

Property Value

PdfName

the font name

IndirectReference

Gets the indirect reference to this font.

public PdfIndirectReference IndirectReference { get; }

Property Value

PdfIndirectReference

the indirect reference to this font

Subset

Indicates if all the glyphs and widths for that particular encoding should be included in the document. Set to false to include all.

public bool Subset { get; set; }

Property Value

bool

Methods

ConvertToBytes(string)

Converts the text into bytes to be placed in the document. The conversion is done according to the font and the encoding and the characters used are stored.

public byte[] ConvertToBytes(string text)

Parameters

text string

the text to convert

Returns

byte[]

the conversion

WriteFont(PdfWriter)

Writes the font definition to the document.

public void WriteFont(PdfWriter writer)

Parameters

writer PdfWriter

the PdfWriter of this document