Package com.pspdfkit.ui.fonts
Class Font
-
- All Implemented Interfaces:
public class Font
A single font that can be set on an com.pspdfkit.annotations.Annotation.
-
-
Method Summary
Modifier and Type Method Description String
getName()
Returns the name of the font family. List<File>
getFontFiles()
Returns all the files associated with the given font family. Typeface
getDefaultTypeface()
Returns the default typeface to use, or null
if this font is not available on this device.File
getDefaultFontFile()
Returns the default font file to use. boolean
equals(Object o)
int
hashCode()
-
-
Constructor Detail
-
Font
Font(String name, List<File> fontFiles)
Creates a new Font.- Parameters:
name
- The family name of this font.fontFiles
- All files associated with the given font family.
-
Font
Font(String name, Typeface defaultTypeface)
Creates a new Font.- Parameters:
name
- The family name of this font.defaultTypeface
- Default Typeface of the given font.
-
-
Method Detail
-
getName
@NonNull() String getName()
Returns the name of the font family.
- Returns:
The name of the font family.
-
getFontFiles
@NonNull() List<File> getFontFiles()
Returns all the files associated with the given font family.
- Returns:
All the files associated with the given font family.
-
getDefaultTypeface
@Nullable() Typeface getDefaultTypeface()
Returns the default typeface to use, or
null
if this font is not available on this device. This can occur if this annotation wasn't created locally.- Returns:
The default typeface to use.
-
getDefaultFontFile
@Nullable() File getDefaultFontFile()
Returns the default font file to use.
- Returns:
The default font file to use or
null
if no font file is available.
-
hashCode
int hashCode()
-
-
-
-