iText 7 7.1.10 API
iText.Layout.Font.FontSelector Class Reference

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

Public Member Functions

 FontSelector (ICollection< FontInfo > allFonts, IList< String > fontFamilies, FontCharacteristics fc)
 Create new FontSelector instance. More...
 
FontInfo BestMatch ()
 The best font match. More...
 
IEnumerable< FontInfoGetFonts ()
 Sorted set of fonts. More...
 

Detailed Description

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

Constructor & Destructor Documentation

◆ FontSelector()

iText.Layout.Font.FontSelector.FontSelector ( ICollection< FontInfo allFonts,
IList< String >  fontFamilies,
FontCharacteristics  fc 
)
inline

Create new FontSelector instance.

Parameters
allFontsunsorted set of all available fonts.
fontFamiliessorted list of preferred font families.
fcinstance of FontCharacteristics.

Member Function Documentation

◆ BestMatch()

FontInfo iText.Layout.Font.FontSelector.BestMatch ( )
inline

The best font match.

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

Returns
the best matched font

◆ GetFonts()

IEnumerable<FontInfo> iText.Layout.Font.FontSelector.GetFonts ( )
inline

Sorted set of fonts.

Returns
sorted set of fonts