CFFEncoding
Date: 2017-05-25

org.apache.fontbox.cff

## Class CFFEncoding

- java.lang.Object
- - org.apache.fontbox.encoding.Encoding
  - - org.apache.fontbox.cff.CFFEncoding

- Direct Known Subclasses:
    CFFExpertEncoding, CFFStandardEncoding

      public abstract class CFFEncoding
      extends Encoding

  A CFF Type 1-equivalent Encoding. An encoding is an array of codes associated with some or all glyphs in a font

- - ### Field Summary

    - ### Fields inherited from class org.apache.fontbox.encoding.Encoding

      `nameToCode`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `add(int code, int sid)` For use by subclasses only.
    `void` | `add(int code, int sid, java.lang.String name)` Adds a new code/SID combination to the encoding.
    `java.lang.String` | `getName(int code)` Returns the name of the glyph for the given character code.

    - ### Methods inherited from class org.apache.fontbox.encoding.Encoding

      `addCharacterEncoding, getCode, getCodeToNameMap`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getName

          public java.lang.String getName(int code)

      Returns the name of the glyph for the given character code.
      Overrides:
        `getName` in class `Encoding`
      Parameters:
        `code` - character code
      Returns:
        PostScript glyph name

    - #### add

          public void add(int code,
                 int sid,
                 java.lang.String name)

      Adds a new code/SID combination to the encoding.
      Parameters:
        `code` - the given code
        `sid` - the given SID

    - #### add

          protected void add(int code,
                 int sid)

      For use by subclasses only.