com.pspdfkit.ui.fonts.FontManager |
Gives you access to all the fonts available on the system.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract List<Font> |
getAvailableFonts()
This lists all the fonts available to use with PSPDFKit.
| ||||||||||
abstract Font |
getFontByName(String name)
Gets the font specified by the given name or
null . |
This lists all the fonts available to use with PSPDFKit.
Gets the font specified by the given name or null
. This function returns fonts for
which getName()
matches (i.e. where the font family name matches) and also fonts
where any of the actual font files (including the font style suffix) matches the given font
name.
final Font font1 = fontManager.getFontByName("Roboto");
final Font font2 = fontManager.getFontByName("Roboto-Bold");
// This method returns the same font object for both inputs.
assert font1 == font2;
name | The name of the font to get. May be null , in which case this method will
always return null . |
---|
null
if no font for the name exists.