Class CFFCIDFont

java.lang.Object
org.apache.fontbox.cff.CFFFont
org.apache.fontbox.cff.CFFCIDFont
All Implemented Interfaces:
FontBoxFont

public class CFFCIDFont extends CFFFont
A Type 0 CIDFont represented in a CFF file. Thread safe.
  • Field Details

  • Constructor Details

    • CFFCIDFont

      public CFFCIDFont()
  • Method Details

    • getRegistry

      public String getRegistry()
      Returns the registry value. * @return the registry
    • setRegistry

      void setRegistry(String registry)
      Sets the registry value.
      Parameters:
      registry - the registry to set
    • getOrdering

      public String getOrdering()
      Returns the ordering value.
      Returns:
      the ordering
    • setOrdering

      void setOrdering(String ordering)
      Sets the ordering value.
      Parameters:
      ordering - the ordering to set
    • getSupplement

      public int getSupplement()
      Returns the supplement value.
      Returns:
      the supplement
    • setSupplement

      void setSupplement(int supplement)
      Sets the supplement value.
      Parameters:
      supplement - the supplement to set
    • getFontDicts

      public List<Map<String,Object>> getFontDicts()
      Returns the font dictionaries.
      Returns:
      the fontDict
    • setFontDict

      void setFontDict(List<Map<String,Object>> fontDict)
      Sets the font dictionaries.
      Parameters:
      fontDict - the fontDict to set
    • getPrivDicts

      public List<Map<String,Object>> getPrivDicts()
      Returns the private dictionary.
      Returns:
      the privDict
    • setPrivDict

      void setPrivDict(List<Map<String,Object>> privDict)
      Sets the private dictionary.
      Parameters:
      privDict - the privDict to set
    • getFdSelect

      public FDSelect getFdSelect()
      Returns the fdSelect value.
      Returns:
      the fdSelect
    • setFdSelect

      void setFdSelect(FDSelect fdSelect)
      Sets the fdSelect value.
      Parameters:
      fdSelect - the fdSelect to set
    • getDefaultWidthX

      private int getDefaultWidthX(int gid)
      Returns the defaultWidthX for the given GID.
      Parameters:
      gid - GID
    • getNominalWidthX

      private int getNominalWidthX(int gid)
      Returns the nominalWidthX for the given GID.
      Parameters:
      gid - GID
    • getLocalSubrIndex

      private byte[][] getLocalSubrIndex(int gid)
      Returns the LocalSubrIndex for the given GID.
      Parameters:
      gid - GID
    • getType2CharString

      public CIDKeyedType2CharString getType2CharString(int cid) throws IOException
      Returns the Type 2 charstring for the given CID.
      Specified by:
      getType2CharString in class CFFFont
      Parameters:
      cid - CID
      Throws:
      IOException - if the charstring could not be read
    • getFontMatrix

      public List<Number> getFontMatrix()
      Description copied from class: CFFFont
      Returns the FontMatrix.
      Specified by:
      getFontMatrix in interface FontBoxFont
      Specified by:
      getFontMatrix in class CFFFont
    • getPath

      public GeneralPath getPath(String selector) throws IOException
      Description copied from interface: FontBoxFont
      Returns the path for the character with the given name.
      Returns:
      glyph path
      Throws:
      IOException - if the path could not be read
    • getWidth

      public float getWidth(String selector) throws IOException
      Description copied from interface: FontBoxFont
      Returns the advance width for the character with the given name.
      Returns:
      glyph advance width
      Throws:
      IOException - if the path could not be read
    • hasGlyph

      public boolean hasGlyph(String selector) throws IOException
      Description copied from interface: FontBoxFont
      Returns true if the font contains the given glyph.
      Parameters:
      selector - PostScript glyph name
      Throws:
      IOException
    • selectorToCID

      private int selectorToCID(String selector)
      Parses a CID selector of the form \ddddd.