Class DSSFileFont

java.lang.Object
eu.europa.esig.dss.pades.AbstractDSSFont
eu.europa.esig.dss.pades.DSSFileFont
All Implemented Interfaces:
DSSFont, Serializable

public class DSSFileFont extends AbstractDSSFont
The Font created from a file
See Also:
  • Constructor Details

    • DSSFileFont

      public DSSFileFont(InputStream inputStream)
      Constructor to load the font from InputStream
      Parameters:
      inputStream - InputStream containing a font
    • DSSFileFont

      public DSSFileFont(DSSDocument dssDocument)
      Constructor to load the font from DSSDocument
      Parameters:
      dssDocument - DSSDocument containing a font
    • DSSFileFont

      public DSSFileFont(DSSDocument dssDocument, float size)
      Constructor to load the font from DSSDocument with a size
      Parameters:
      dssDocument - DSSDocument containing a font
      size - value of the font
  • Method Details

    • initializeDefault

      public static DSSFileFont initializeDefault()
      Initializes the default DSSFileFont
      Returns:
      DSSFileFont
    • getJavaFont

      public Font getJavaFont()
      Description copied from interface: DSSFont
      Gets the JAVA instance of the Font
      Returns:
      Font
    • getInputStream

      public InputStream getInputStream()
      Gets font's content InputStream
      Returns:
      InputStream of the font's document
    • getName

      public String getName()
      Gets name of the font document
      Returns:
      String font document name
    • setEmbedFontSubset

      public void setEmbedFontSubset(boolean embedFontSubset)
      Sets whether only a subset of used glyphs should be embedded to a PDF, when a DSSFileFont is used. When set to TRUE, only the used glyphs will be embedded to a font. When set to FALSE, all glyphs from a font will be embedded to a PDF. DEFAULT : FALSE (the whole font file is embedded to a PDF) NOTE : this parameter will not take effect for DefaultPdfBoxVisibleSignatureDrawer
      Parameters:
      embedFontSubset - whether only a subset of used glyphs should be embedded to a PDF
    • isEmbedFontSubset

      public boolean isEmbedFontSubset()
      This method returns whether only a font subset should be included into a PDF
      Returns:
      TRUE if a font subset should be included to a PDF, FALSE if the whole font file