Package org.apache.pdfbox.pdmodel.font
Class PDCIDFontType2Font
java.lang.Object
org.apache.pdfbox.pdmodel.font.PDFont
org.apache.pdfbox.pdmodel.font.PDSimpleFont
org.apache.pdfbox.pdmodel.font.PDCIDFont
org.apache.pdfbox.pdmodel.font.PDCIDFontType2Font
- All Implemented Interfaces:
COSObjectable
This is implementation of the CIDFontType2 Font.
- Author:
- Ben Litchfield
-
Field Summary
Fields inherited from class org.apache.pdfbox.pdmodel.font.PDFont
cmap, cmapObjects, font, fontMatrix, resourceRootCMAP, toUnicodeCmap
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionLooks up, creates, returns the AWT Font.boolean
Indicates if this font has a CIDToGIDMap.int
mapCIDToGID
(int cid) Maps the given CID to the correspondent GID.Methods inherited from class org.apache.pdfbox.pdmodel.font.PDCIDFont
clear, determineEncoding, encode, getAverageFontWidth, getDefaultWidth, getFontBoundingBox, getFontHeight, getFontWidth, getFontWidth, setDefaultWidth
Methods inherited from class org.apache.pdfbox.pdmodel.font.PDSimpleFont
drawString, getSpaceWidth, getToUnicode, isFontSubstituted, setIsFontSubstituted, setToUnicode, writeFont
Methods inherited from class org.apache.pdfbox.pdmodel.font.PDFont
clearResources, cmapEncoding, drawString, encodeToCID, equals, getAFM, getAverageFontWidthFromAFMFile, getBaseFont, getCodeFromArray, getCOSObject, getEncoding, getFirstChar, getFontDescriptor, getFontEncoding, getFontMatrix, getFontWidthFromAFMFile, getLastChar, getStringFromArray, getStringWidth, getSubType, getToUnicodeCMap, getType, getWidths, hashCode, hasToUnicode, isSymbolicFont, isType0Font, isType1Font, isType3Font, parseCmap, setBaseFont, setEncoding, setFirstChar, setFontDescriptor, setFontEncoding, setHasToUnicode, setLastChar, setWidths
-
Constructor Details
-
PDCIDFontType2Font
public PDCIDFontType2Font()Constructor. -
PDCIDFontType2Font
Constructor.- Parameters:
fontDictionary
- The font dictionary according to the PDF specification.
-
-
Method Details
-
getawtFont
Looks up, creates, returns the AWT Font.- Overrides:
getawtFont
in classPDSimpleFont
- Returns:
- returns the awt font to bes used for rendering
- Throws:
IOException
- if something went wrong.
-
hasCIDToGIDMap
public boolean hasCIDToGIDMap()Indicates if this font has a CIDToGIDMap.- Returns:
- returns true if the font has a CIDToGIDMap.
-
mapCIDToGID
public int mapCIDToGID(int cid) Maps the given CID to the correspondent GID.- Parameters:
cid
- the given CID- Returns:
- the mapped GID, or -1 if something went wrong.
-