Package org.apache.pdfbox.pdmodel.font
Class PDCIDFontType0Font
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.PDCIDFontType0Font
- All Implemented Interfaces:
COSObjectable
This is implementation of the CIDFontType0 Font.
- Version:
- $Revision: 1.6 $
- 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 TypeMethodDescriptionReturns the AWT font that corresponds with this CIDFontType0 font.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
-
PDCIDFontType0Font
public PDCIDFontType0Font()Constructor. -
PDCIDFontType0Font
Constructor.- Parameters:
fontDictionary
- The font dictionary according to the PDF specification.
-
-
Method Details
-
getawtFont
Returns the AWT font that corresponds with this CIDFontType0 font. By default we try to look up a system font with the same name. If that fails and the font file is embedded in the PDF document, we try to generate the AWT font using thePDType1CFont
class. Ideally the embedded font would be used always if available, but since the code doesn't work correctly for all fonts yet we opt to use the system font by default.- Overrides:
getawtFont
in classPDSimpleFont
- Returns:
- AWT font, or
null
if not available - Throws:
IOException
- if something went wrong.
-