java.lang.Object
com.google.typography.font.tools.subsetter.Subsetter
直接已知子类:
RenumberingSubsetter

public abstract class Subsetter extends Object
sfntly sample code demonstrating subsetting. Work in progress.
作者:
Stuart Gill
  • 字段详细资料

  • 构造器详细资料

  • 方法详细资料

    • setGlyphs

      public void setGlyphs(List<Integer> glyphs)
    • setCMaps

      public void setCMaps(List<CMapTable.CMapId> cmapIds, int number)
      Set the cmaps to be used in the subsetted font. The cmaps are listed in order of priority and the number parameter gives a count of how many of the list should be put into the subsetted font. If there are no matches in the font for any of the provided cmap ids which would lead to a font with no cmap then an error will be thrown during subsetting. The two most common cases would be:
        a list of one or more cmap ids with a count setting of 1
        This will use the list of cmap ids as an ordered priority and look for an available cmap in the font that matches the requests. Only the first such match will be placed in the subsetted font.
        a list of one or more cmap ids with a count setting equal to the list length
        This will use the list of cmap ids and try to place each one specified into the subsetted font.
      参数:
      cmapIds - the cmap ids to use for the subsetted font
      number - the maximum number of cmaps to place in the subsetted font
    • setRemoveTables

      public void setRemoveTables(Set<Integer> removeTables)
    • subset

      public Font.Builder subset() throws IOException
      抛出:
      IOException
    • glyphMappingTable

      List<Integer> glyphMappingTable()
      Get the permutation table of the old glyph id to the new glyph id.
      返回:
      the permutation table
    • getInverseMapping

      Map<Integer,Integer> getInverseMapping()
      Get the inverse mapping, from new glyph id to old.
      返回:
      the inverse mapping
    • cmapId

    • setUpTables

      protected abstract void setUpTables(Font.Builder fontBuilder)
    • getMap

      public Map<Character,Character> getMap()
      返回:
      the map