Package com.dynamicpdf.api
Class Font
java.lang.Object
com.dynamicpdf.api.Font
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Font
Initializes a new instance of theFont
class using the file path of the font and resource name.static Font
Initializes a new instance of theFont
class using the file path of the font and resource name.static Font
fromStream(InputStream stream)
Initializes a new instance of theFont
class using the file path of the font and resource name.static Font
fromStream(InputStream stream, String resourceName)
Initializes a new instance of theFont
class using the stream of the font file and resource name.static Font
fromSystem(String fontName)
Initializes a new instance of theFont
class using the system font name and resource name.static Font
fromSystem(String fontName, String resourceName)
Initializes a new instance of theFont
class using the system font name and resource name.static Font
Gets the Courier core font with Latin 1 encoding.static Font
Gets the Courier Bold core font with Latin 1 encoding.static Font
Gets the Courier Bold Oblique core font with Latin 1 encoding.static Font
Gets the Courier Oblique core font with Latin 1 encoding.boolean
getEmbed()
Gets a boolean indicating whether to embed the font.static Font
Gets the Helvetica core font with Latin 1 encoding.static Font
Gets the Helvetica Bold core font with Latin 1 encoding.static Font
Gets the Helvetica Bold Oblique core font with Latin 1 encoding.static Font
Gets the Helvetica Oblique core font with Latin 1 encoding.getName()
Gets the name of the fontcom.dynamicpdf.api.FontResource
Gets the font resourceGets a name for the font resource.boolean
Gets a boolean indicating whether to subset embed the font.static Font
Gets the Symbol core font.static Font
Gets the Times Bold core font with Latin 1 encoding.static Font
Gets the Times Bold Italic core font with Latin 1 encoding.static Font
Gets the Times Italic core font with Latin 1 encoding.static Font
Gets the Times Roman core font with Latin 1 encoding.static Font
Gets the Zapf Dingbats core font.void
setEmbed(boolean value)
Sets a boolean indicating whether to embed the font.void
setResourceName(String value)
Sets a name for the font resource.void
setSubset(boolean value)
Sets a boolean indicating whether to subset embed the font.
-
Constructor Details
-
Font
Initializes a new instance of theFont
class using the font name that is present in the cloud resource manager.- Parameters:
cloudResourceName
- The font name present in the cloud resource manager.
-
-
Method Details
-
getName
Gets the name of the font- Returns:
- The name of the font
-
getResource
public com.dynamicpdf.api.FontResource getResource()Gets the font resource- Returns:
- The font resource
-
getEmbed
public boolean getEmbed()Gets a boolean indicating whether to embed the font.- Returns:
- A boolean indicating whether to embed the font.
-
setEmbed
public void setEmbed(boolean value)Sets a boolean indicating whether to embed the font.- Parameters:
value
- A boolean indicating whether to embed the font.
-
getSubset
public boolean getSubset()Gets a boolean indicating whether to subset embed the font.- Returns:
- A boolean indicating whether to subset embed the font.
-
setSubset
public void setSubset(boolean value)Sets a boolean indicating whether to subset embed the font.- Parameters:
value
- A boolean indicating whether to subset embed the font.
-
getResourceName
Gets a name for the font resource.- Returns:
- A name for the font resource.
-
setResourceName
Sets a name for the font resource.- Parameters:
value
- A name for the font resource.
-
getTimesRoman
Gets the Times Roman core font with Latin 1 encoding.- Returns:
- The Times Roman core font with Latin 1 encoding.
-
getTimesBold
Gets the Times Bold core font with Latin 1 encoding.- Returns:
- The Times Bold core font with Latin 1 encoding.
-
getTimesItalic
Gets the Times Italic core font with Latin 1 encoding.- Returns:
- The Times Italic core font with Latin 1 encoding.
-
getTimesBoldItalic
Gets the Times Bold Italic core font with Latin 1 encoding.- Returns:
- The Times Bold Italic core font with Latin 1 encoding.
-
getHelvetica
Gets the Helvetica core font with Latin 1 encoding.- Returns:
- The Helvetica core font with Latin 1 encoding.
-
getHelveticaBold
Gets the Helvetica Bold core font with Latin 1 encoding.- Returns:
- The Helvetica Bold core font with Latin 1 encoding.
-
getHelveticaOblique
Gets the Helvetica Oblique core font with Latin 1 encoding.- Returns:
- The Helvetica Oblique core font with Latin 1 encoding.
-
getHelveticaBoldOblique
Gets the Helvetica Bold Oblique core font with Latin 1 encoding.- Returns:
- The Helvetica Bold Oblique core font with Latin 1 encoding.
-
getCourier
Gets the Courier core font with Latin 1 encoding.- Returns:
- The Courier core font with Latin 1 encoding.
-
getCourierBold
Gets the Courier Bold core font with Latin 1 encoding.- Returns:
- The Courier Bold core font with Latin 1 encoding.
-
getCourierOblique
Gets the Courier Oblique core font with Latin 1 encoding.- Returns:
- The Courier Oblique core font with Latin 1 encoding.
-
getCourierBoldOblique
Gets the Courier Bold Oblique core font with Latin 1 encoding.- Returns:
- The Courier Bold Oblique core font with Latin 1 encoding.
-
getSymbol
Gets the Symbol core font.- Returns:
- The Symbol core font.
-
getZapfDingbats
Gets the Zapf Dingbats core font.- Returns:
- The Zapf Dingbats core font.
-
fromFile
Initializes a new instance of theFont
class using the file path of the font and resource name.- Parameters:
filePath
- The file path of the font file.resourceName
- The resource name for the font.- Returns:
- The font
-
fromFile
Initializes a new instance of theFont
class using the file path of the font and resource name.- Parameters:
filePath
- The file path of the font file.- Returns:
- The file path of the font file.
-
fromStream
Initializes a new instance of theFont
class using the stream of the font file and resource name.- Parameters:
stream
- The stream of the font file.resourceName
- The resource name for the font.- Returns:
- The font
-
fromStream
Initializes a new instance of theFont
class using the file path of the font and resource name.- Parameters:
stream
- The stream of the font file.- Returns:
- The font from stream
-
fromSystem
Initializes a new instance of theFont
class using the system font name and resource name.- Parameters:
fontName
- The name of the font in the system.resourceName
- The resource name for the font.- Returns:
- The font from system.
-
fromSystem
Initializes a new instance of theFont
class using the system font name and resource name.- Parameters:
fontName
- The name of the font in the system.- Returns:
- The font from system.
-