Class Font

java.lang.Object
com.dynamicpdf.api.Font

public class Font extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    Font​(String cloudResourceName)
    Initializes a new instance of the Font class using the font name that is present in the cloud resource manager.
  • Method Summary

    Modifier and Type
    Method
    Description
    static Font
    fromFile​(String filePath)
    Initializes a new instance of the Font class using the file path of the font and resource name.
    static Font
    fromFile​(String filePath, String resourceName)
    Initializes a new instance of the Font class using the file path of the font and resource name.
    static Font
    Initializes a new instance of the Font class using the file path of the font and resource name.
    static Font
    fromStream​(InputStream stream, String resourceName)
    Initializes a new instance of the Font class using the stream of the font file and resource name.
    static Font
    fromSystem​(String fontName)
    Initializes a new instance of the Font class using the system font name and resource name.
    static Font
    fromSystem​(String fontName, String resourceName)
    Initializes a new instance of the Font 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
    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.
    Gets the name of the font
    com.dynamicpdf.api.FontResource
    Gets the font resource
    Gets 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
    Sets a name for the font resource.
    void
    setSubset​(boolean value)
    Sets a boolean indicating whether to subset embed the font.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Font

      public Font(String cloudResourceName)
      Initializes a new instance of the Font 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

      public String 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

      public String getResourceName()
      Gets a name for the font resource.
      Returns:
      A name for the font resource.
    • setResourceName

      public void setResourceName(String value)
      Sets a name for the font resource.
      Parameters:
      value - A name for the font resource.
    • getTimesRoman

      public static Font getTimesRoman()
      Gets the Times Roman core font with Latin 1 encoding.
      Returns:
      The Times Roman core font with Latin 1 encoding.
    • getTimesBold

      public static Font getTimesBold()
      Gets the Times Bold core font with Latin 1 encoding.
      Returns:
      The Times Bold core font with Latin 1 encoding.
    • getTimesItalic

      public static Font getTimesItalic()
      Gets the Times Italic core font with Latin 1 encoding.
      Returns:
      The Times Italic core font with Latin 1 encoding.
    • getTimesBoldItalic

      public static Font getTimesBoldItalic()
      Gets the Times Bold Italic core font with Latin 1 encoding.
      Returns:
      The Times Bold Italic core font with Latin 1 encoding.
    • getHelvetica

      public static Font getHelvetica()
      Gets the Helvetica core font with Latin 1 encoding.
      Returns:
      The Helvetica core font with Latin 1 encoding.
    • getHelveticaBold

      public static Font getHelveticaBold()
      Gets the Helvetica Bold core font with Latin 1 encoding.
      Returns:
      The Helvetica Bold core font with Latin 1 encoding.
    • getHelveticaOblique

      public static Font getHelveticaOblique()
      Gets the Helvetica Oblique core font with Latin 1 encoding.
      Returns:
      The Helvetica Oblique core font with Latin 1 encoding.
    • getHelveticaBoldOblique

      public static Font getHelveticaBoldOblique()
      Gets the Helvetica Bold Oblique core font with Latin 1 encoding.
      Returns:
      The Helvetica Bold Oblique core font with Latin 1 encoding.
    • getCourier

      public static Font getCourier()
      Gets the Courier core font with Latin 1 encoding.
      Returns:
      The Courier core font with Latin 1 encoding.
    • getCourierBold

      public static Font getCourierBold()
      Gets the Courier Bold core font with Latin 1 encoding.
      Returns:
      The Courier Bold core font with Latin 1 encoding.
    • getCourierOblique

      public static Font getCourierOblique()
      Gets the Courier Oblique core font with Latin 1 encoding.
      Returns:
      The Courier Oblique core font with Latin 1 encoding.
    • getCourierBoldOblique

      public static Font getCourierBoldOblique()
      Gets the Courier Bold Oblique core font with Latin 1 encoding.
      Returns:
      The Courier Bold Oblique core font with Latin 1 encoding.
    • getSymbol

      public static Font getSymbol()
      Gets the Symbol core font.
      Returns:
      The Symbol core font.
    • getZapfDingbats

      public static Font getZapfDingbats()
      Gets the Zapf Dingbats core font.
      Returns:
      The Zapf Dingbats core font.
    • fromFile

      public static Font fromFile(String filePath, String resourceName)
      Initializes a new instance of the Font 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

      public static Font fromFile(String filePath)
      Initializes a new instance of the Font 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

      public static Font fromStream(InputStream stream, String resourceName)
      Initializes a new instance of the Font 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

      public static Font fromStream(InputStream stream)
      Initializes a new instance of the Font 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

      public static Font fromSystem(String fontName, String resourceName)
      Initializes a new instance of the Font 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

      public static Font fromSystem(String fontName)
      Initializes a new instance of the Font class using the system font name and resource name.
      Parameters:
      fontName - The name of the font in the system.
      Returns:
      The font from system.