org.apache.pdfbox.pdmodel.font

## Class CIDFontMapping

- java.lang.Object
- - org.apache.pdfbox.pdmodel.font.FontMapping<org.apache.fontbox.ttf.OpenTypeFont>
  - - org.apache.pdfbox.pdmodel.font.CIDFontMapping

    public final class CIDFontMapping
    extends FontMapping<org.apache.fontbox.ttf.OpenTypeFont>

A CIDFontMapping is a kind of FontMapping which allows for an additional TrueTypeFont substitute to be provided if a CID font is not available.

Author:
  John Hewson

### Constructor Summary

Constructors
Constructor and Description
`CIDFontMapping(org.apache.fontbox.ttf.OpenTypeFont font, org.apache.fontbox.FontBoxFont fontBoxFont, boolean isFallback)`

### Method Summary

All Methods Instance Methods Concrete Methods
`org.apache.fontbox.FontBoxFont` `getTrueTypeFont()` Returns a TrueType font when isCIDFont() is true, otherwise null.
`boolean` `isCIDFont()` Returns true if this is a CID font.

### Methods inherited from class org.apache.pdfbox.pdmodel.font.FontMapping

`getFont, isFallback`

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

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

### Constructor Detail

#### CIDFontMapping

    public CIDFontMapping(org.apache.fontbox.ttf.OpenTypeFont font,
                          org.apache.fontbox.FontBoxFont fontBoxFont,
                          boolean isFallback)

### Method Detail

#### getTrueTypeFont

    public org.apache.fontbox.FontBoxFont getTrueTypeFont()

Returns a TrueType font when isCIDFont() is true, otherwise null.

Returns:
  the mapped TrueType font or null

#### isCIDFont

    public boolean isCIDFont()

Returns true if this is a CID font.

Returns:
  true if the mapped font is a CID font