Class SubsetDefaultImpl

java.lang.Object
com.adobe.fontengine.font.SubsetDefaultImpl
All Implemented Interfaces:
Subset
Direct Known Subclasses:
NameKeyedSubset, OTSubset, Type1Subset

public class SubsetDefaultImpl extends Object implements Subset
A default implementation for the Subset interface.

This implementation is suitable for subclassing, if specific behaviour is needed beyond the correspondance between subset and full gids.

  • Constructor Summary

    Constructors
    Constructor
    Description
    SubsetDefaultImpl(int numGlyphs, boolean doSubset)
    Create a new subset for a font.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
    getExistingSubsetGid(int fullGid)
    Return the currently esisting subset gid corresponding to a full gid, if there is one, without generating a new one.
    int
    getFullGid(int subsetGid)
    Return the full gid corresponding to a subset gid.
    int
    Return the number of glyphs in the subset.
    int
    getSubsetGid(int fullGid)
    Return the subset gid corresponding to a full gid.

    Methods inherited from class java.lang.Object

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

  • Method Details

    • doSubset

      public boolean doSubset()
    • getNumGlyphs

      public int getNumGlyphs()
      Description copied from interface: Subset
      Return the number of glyphs in the subset.
      Specified by:
      getNumGlyphs in interface Subset
    • getSubsetGid

      public int getSubsetGid(int fullGid) throws InvalidFontException, UnsupportedFontException
      Description copied from interface: Subset
      Return the subset gid corresponding to a full gid.
      Specified by:
      getSubsetGid in interface Subset
      Parameters:
      fullGid - the full gid, must be a legal gid for the full font.
      Throws:
      InvalidFontException
      UnsupportedFontException
    • getFullGid

      public int getFullGid(int subsetGid)
      Description copied from interface: Subset
      Return the full gid corresponding to a subset gid.
      Specified by:
      getFullGid in interface Subset
      Parameters:
      subsetGid - the subset gid, must be in the range [0..getNumGlyphs () [
    • getExistingSubsetGid

      public int getExistingSubsetGid(int fullGid)
      Description copied from interface: Subset
      Return the currently esisting subset gid corresponding to a full gid, if there is one, without generating a new one. Return -1 if the full gid is not in the subset.
      Specified by:
      getExistingSubsetGid in interface Subset
      Parameters:
      fullGid - the full gid, must be a legal gid for the full font.