Table of Contents

Class FontSelector

Namespace
iText.Layout.Font
Assembly
itext.layout.dll

Sort given set of fonts according to font name and style.

public class FontSelector
Inheritance
FontSelector
Inherited Members

Constructors

FontSelector(ICollection<FontInfo>, IList<string>, FontCharacteristics)

Create new FontSelector instance.

public FontSelector(ICollection<FontInfo> allFonts, IList<string> fontFamilies, FontCharacteristics fc)

Parameters

allFonts ICollection<FontInfo>

unsorted set of all available fonts.

fontFamilies IList<string>

sorted list of preferred font families.

fc FontCharacteristics

instance of FontCharacteristics.

Fields

fonts

protected IList<FontInfo> fonts

Field Value

IList<FontInfo>

Methods

BestMatch()

The best font match.

public FontInfo BestMatch()

Returns

FontInfo

the best matched font

Remarks

The best font match. If any font from GetFonts() doesn't contain requested glyphs, this font will be used.

GetComparator(IList<string>, FontCharacteristics)

protected virtual IComparer<FontInfo> GetComparator(IList<string> fontFamilies, FontCharacteristics fc)

Parameters

fontFamilies IList<string>
fc FontCharacteristics

Returns

IComparer<FontInfo>

GetFonts()

Sorted set of fonts.

public IEnumerable<FontInfo> GetFonts()

Returns

IEnumerable<FontInfo>

sorted set of fonts