Class OTFSubSetFile


public class OTFSubSetFile extends OTFSubSetWriter
Reads an OpenType CFF file and generates a subset The OpenType specification can be found at the Microsoft Typography site: http://www.microsoft.com/typography/otspec/
  • Field Details

    • subsetGlyphs

      protected Map<Integer,Integer> subsetGlyphs
      A map containing each glyph to be included in the subset with their existing and new GID's
    • gidToSID

      protected Map<Integer,Integer> gidToSID
      A map of the new GID to SID used to construct the charset table
    • localIndexSubr

      protected CFFDataReader.CFFIndexData localIndexSubr
    • globalIndexSubr

      protected CFFDataReader.CFFIndexData globalIndexSubr
    • subsetLocalIndexSubr

      protected List<byte[]> subsetLocalIndexSubr
      List of subroutines to write to the local / global indexes in the subset font
    • subsetGlobalIndexSubr

      protected List<byte[]> subsetGlobalIndexSubr
    • fdSubrs

      protected List<List<byte[]>> fdSubrs
      For fonts which have an FDSelect or ROS flag in Top Dict, this is used to store the local subroutine indexes for each group as opposed to the above subsetLocalIndexSubr
    • subsetFDSelect

      private Map<Integer,OTFSubSetFile.FDIndexReference> subsetFDSelect
      The subset FD Select table used to store the mappings between glyphs and their associated FDFont object which point to a private dict and local subroutines.
    • localUniques

      protected List<Integer> localUniques
      A list of unique subroutines from the global / local subroutine indexes
    • globalUniques

      protected List<Integer> globalUniques
    • subsetLocalSubrCount

      protected int subsetLocalSubrCount
      A store of the number of subroutines each global / local subroutine will store
    • subsetGlobalSubrCount

      protected int subsetGlobalSubrCount
    • subsetCharStringsIndex

      protected List<byte[]> subsetCharStringsIndex
      A list of char string data for each glyph to be stored in the subset font
    • embeddedName

      protected String embeddedName
      The embedded name to change in the name table
    • stringIndexData

      protected List<byte[]> stringIndexData
      An array used to hold the string index data for the subset font
    • cffReader

      protected CFFDataReader cffReader
      The CFF reader object used to read data and offsets from the original font file
    • mbFont

      private MultiByteFont mbFont
      The class used to represent this font
    • NUM_STANDARD_STRINGS

      public static final int NUM_STANDARD_STRINGS
      The number of standard strings in CFF
      See Also:
    • LOCAL_SUBROUTINE

      private static final int LOCAL_SUBROUTINE
      The operator used to identify a local subroutine reference
      See Also:
    • GLOBAL_SUBROUTINE

      private static final int GLOBAL_SUBROUTINE
      The operator used to identify a global subroutine reference
      See Also:
    • ACCENT_CMD

      private static final String ACCENT_CMD
      See Also:
    • type2Parser

      private OTFSubSetFile.Type2Parser type2Parser
      The parser used to parse type2 charstring
  • Constructor Details

  • Method Details