public class FontSelector extends Object
Constructor and Description |
---|
FontSelector(Collection<FontInfo> allFonts, List<String> fontFamilies, FontCharacteristics fc)
Create new FontSelector instance.
|
Modifier and Type | Method and Description |
---|---|
FontInfo |
bestMatch()
The best font match.
|
protected Comparator<FontInfo> |
getComparator(List<String> fontFamilies, FontCharacteristics fc) |
Iterable<FontInfo> |
getFonts()
Sorted set of fonts.
|
public FontSelector(Collection<FontInfo> allFonts, List<String> fontFamilies, FontCharacteristics fc)
allFonts
- unsorted set of all available fonts.
fontFamilies
- sorted list of preferred font families.
fc
- instance of FontCharacteristics
.
public final FontInfo bestMatch()
getFonts()
doesn't contain requested glyphs, this font will be used.
public final Iterable<FontInfo> getFonts()
protected Comparator<FontInfo> getComparator(List<String> fontFamilies, FontCharacteristics fc)
Copyright © 1998–2023 iText Group NV. All rights reserved.