public class

FontResource

extends Object
java.lang.Object
   ↳ com.pdftron.pdf.model.FontResource

Class Overview

Class that contains info about font resource

Summary

Constants
String FONT_FOLDER
Public Constructors
FontResource(String displayName, String filePath, String fontName, String pdftronName)
Class constructor
FontResource(String fontName)
Class constructor
Public Methods
boolean equals(Object obj)
Whether this font equals other font resource
String getDisplayName()
Gets display name
static String getFileName(String filePath)
String getFilePath()
Gets font file path
String getFontName()
Gets font name
String getPDFTronName()
Gets font pdftron name
Boolean hasFilePath()
Whether the font has font file path
Boolean hasFontName()
Whether the font has font name
Boolean hasPDFTronName()
Whether the font has pdftron name
boolean isEmpty()
Whether the font is empty
void setDisplayName(String displayName)
Sets font display name
void setFilePath(String filePath)
Sets font system path
void setFontName(String fontName)
Sets font name
void setPDFTronName(String PDFTronName)
Sets font pdftron name
String toString()
Convert font to string
static boolean whiteListFont(String fontName, String fontFilePath)
Whehter given font name is a white list name
static String whiteListFonts(String fontInfo)
Gets white list fonts from given font info
static writeFontAssetsToCache(Context context, Set<String> fonts)
static writeFontFileToCache(Context context, Set<String> fonts)
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String FONT_FOLDER

Constant Value: "fonts"

Public Constructors

public FontResource (String displayName, String filePath, String fontName, String pdftronName)

Class constructor

Parameters
displayName font display name
filePath font system path
fontName font name
pdftronName font pdftron name

public FontResource (String fontName)

Class constructor

Parameters
fontName font name

Public Methods

public boolean equals (Object obj)

Whether this font equals other font resource

Parameters
obj other font resource
Returns
  • true then equals, false otherwise

public String getDisplayName ()

Gets display name

Returns
  • display name

public static String getFileName (String filePath)

public String getFilePath ()

Gets font file path

Returns
  • font file path

public String getFontName ()

Gets font name

Returns
  • font name

public String getPDFTronName ()

Gets font pdftron name

Returns
  • font pdftron name

public Boolean hasFilePath ()

Whether the font has font file path

Returns
  • true then it has font file path, false otherwise

public Boolean hasFontName ()

Whether the font has font name

Returns
  • true then it has font name, false otherwise

public Boolean hasPDFTronName ()

Whether the font has pdftron name

Returns
  • true then it has font pdftron name, false otherwise

public boolean isEmpty ()

Whether the font is empty

Returns
  • true then it is empty, false otherwise

public void setDisplayName (String displayName)

Sets font display name

Parameters
displayName display name

public void setFilePath (String filePath)

Sets font system path

Parameters
filePath font file path

public void setFontName (String fontName)

Sets font name

Parameters
fontName font name

public void setPDFTronName (String PDFTronName)

Sets font pdftron name

Parameters
PDFTronName font pdftron name

public String toString ()

Convert font to string

Returns
  • String of font Resource

public static boolean whiteListFont (String fontName, String fontFilePath)

Whehter given font name is a white list name

Parameters
fontName font name
fontFilePath font file path
Returns
  • true then it is a white list name, false otherwise

public static String whiteListFonts (String fontInfo)

Gets white list fonts from given font info

Parameters
fontInfo font info
Returns
  • white list fonts in string format

public static writeFontAssetsToCache (Context context, Set<String> fonts)

public static writeFontFileToCache (Context context, Set<String> fonts)