public class

Font

extends Object
java.lang.Object
   ↳ com.pspdfkit.ui.fonts.Font

Class Overview

A single font that can be set on an Annotation.

Summary

Public Constructors
Font(String name, List<File> fontFiles)
Creates a new Font.
Public Methods
File getDefaultFontFile()
Returns the default font file to use.
Typeface getDefaultTypeface()
Returns the default typeface to use.
List<File> getFontFiles()
Returns all the files associated with the given font family.
String getName()
Returns the name of the font family.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Font (String name, List<File> fontFiles)

Creates a new Font. Note: This should not be called from the main thread since this will preload the default typeface causing disk I/O.

Parameters
name The family name of this font.
fontFiles All files associated with the given font family.

Public Methods

public File getDefaultFontFile ()

Returns the default font file to use.

Returns
  • The default font file to use.

public Typeface getDefaultTypeface ()

Returns the default typeface to use.

Returns
  • The default typeface to use.

public List<File> getFontFiles ()

Returns all the files associated with the given font family.

Returns
  • All the files associated with the given font family.

public String getName ()

Returns the name of the font family.

Returns
  • The name of the font family.