org.apache.pdfbox.pdmodel.font.encoding

## Class Type1Encoding

- java.lang.Object
- - org.apache.pdfbox.pdmodel.font.encoding.Encoding
  - - org.apache.pdfbox.pdmodel.font.encoding.Type1Encoding

All Implemented Interfaces:
  COSObjectable

    public class Type1Encoding
    extends Encoding

An encoding for a Type 1 font.

### Field Summary

### Fields inherited from class org.apache.pdfbox.pdmodel.font.encoding.Encoding

`CHAR_CODE, CHAR_NAME, codeToName, inverted`

### Constructor Summary

Constructors
Constructor and Description
`Type1Encoding()` Creates an empty encoding.
`Type1Encoding(org.apache.fontbox.afm.FontMetrics fontMetrics)` Creates an encoding from the given AFM font metrics.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static Type1Encoding` `fromFontBox(org.apache.fontbox.encoding.Encoding encoding)` Creates an encoding from the given FontBox encoding.
`COSBase` `getCOSObject()` Convert this standard java object to a COS object.
`String` `getEncodingName()` Returns the name of this encoding.

### Methods inherited from class org.apache.pdfbox.pdmodel.font.encoding.Encoding

`add, contains, contains, getCodeToNameMap, getInstance, getName, getNameToCodeMap, overwrite`

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

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

### Constructor Detail

#### Type1Encoding

    public Type1Encoding()

Creates an empty encoding.

#### Type1Encoding

    public Type1Encoding(org.apache.fontbox.afm.FontMetrics fontMetrics)

Creates an encoding from the given AFM font metrics.

Parameters:
  `fontMetrics` - AFM font metrics.

### Method Detail

#### fromFontBox

    public static Type1Encoding fromFontBox(org.apache.fontbox.encoding.Encoding encoding)

Creates an encoding from the given FontBox encoding.

Parameters:
  `encoding` - FontBox encoding
Returns:
  the encoding created from the given FontBox encoding

#### getCOSObject

    public COSBase getCOSObject()

Description copied from interface: `COSObjectable`
Convert this standard java object to a COS object.

Returns:
  The cos object that matches this Java object.

#### getEncodingName

    public String getEncodingName()

Description copied from class: `Encoding`
Returns the name of this encoding.

Specified by:
  `getEncodingName` in class `Encoding`
Returns:
  the name of the encoding