jPod PDF library

de.intarsys.pdf.font
Class PDFontType0

java.lang.Object
  extended by de.intarsys.pdf.cos.COSBasedObject
      extended by de.intarsys.pdf.pd.PDObject
          extended by de.intarsys.pdf.font.PDFont
              extended by de.intarsys.pdf.font.PDFontType0
All Implemented Interfaces:
ICOSObjectListener, de.intarsys.tools.attribute.IAttributeSupport

public class PDFontType0
extends PDFont

A composite (Type 0) font.


Nested Class Summary
static class PDFontType0.MetaClass
          The meta class implementation
 
Field Summary
static COSName DK_DescendantFonts
           
static PDFontType0.MetaClass META
          The meta class instance
 
Fields inherited from class de.intarsys.pdf.font.PDFont
CN_Subtype_CIDFontType0, CN_Subtype_CIDFontType2, CN_Subtype_MMType1, CN_Subtype_TrueType, CN_Subtype_Type0, CN_Subtype_Type1, CN_Subtype_Type3, CN_Type_Font, DK_BaseFont, DK_Encoding, DK_FirstChar, DK_FontDescriptor, DK_LastChar, DK_Name, DK_ToUnicode, DK_Widths
 
Fields inherited from class de.intarsys.pdf.pd.PDObject
DK_Subtype, DK_Type
 
Constructor Summary
PDFontType0(COSObject object)
           
 
Method Summary
 CMap getCMap()
          The CMap associated with the Type0 font.
 CIDFont getDescendantFont()
          The descendant font (font program) for the Type0 font.
 PDFontDescriptor getFontDescriptor()
          The PDFontDescriptor object for this font.
 String getFontFamilyName()
           
 String getFontName()
           
 String getFontNameNormalized()
           
 PDFontStyle getFontStyle()
           
 String getFontType()
           
 int getGlyphIndex(int cid)
           
 PDGlyphs getGlyphsEncoded(int codepoint)
          The PDGlyphs instance for the encoded codepoint.
 int getGlyphWidthEncoded(int codePoint)
          The glyph width of an encoded codepoint in the font.
 PDGlyphs getNextGlyphsEncoded(ByteArrayInputStream is)
          The PDGlyphs denoted by the next byte or bytes in the input stream.
 void setDescendantFont(CIDFont font)
           
 
Methods inherited from class de.intarsys.pdf.font.PDFont
dumpFontFile, getBaseFont, getEncoding, getFirstChar, getFontFamilyName, getFontName, getFontStyle, getLastChar, getLookupFontFamilyName, getLookupFontName, getLookupFontStyle, getMacintoshRomanCode, getMissingWidth, getToUnicode, invalidateCaches, isEmbedded, isStandardFont, isSubset, setBaseFont, setEncoding, setFontDescriptor, setLookupFontFamilyName, setLookupFontName, setLookupFontStyle, setToUnicode, toString
 
Methods inherited from class de.intarsys.pdf.pd.PDObject
cosGetFieldDescendant, cosGetFieldInheritable, cosGetFieldInherited, cosGetSubtype, cosGetType, cosRemoveFieldInheritable, cosSetFieldInheritable, cosSetSubtype, cosSetType, getDoc, getGenericChildren, getGenericParent, setGenericParent
 
Methods inherited from class de.intarsys.pdf.cos.COSBasedObject
changed, cosGetArray, cosGetDict, cosGetDoc, cosGetField, cosGetObject, cosGetStream, cosHasField, cosRemoveField, cosSetField, getAttribute, getFieldBoolean, getFieldDate, getFieldFixed, getFieldFixedArray, getFieldInt, getFieldMLString, getFieldString, removeAttribute, setAttribute, setFieldBoolean, setFieldFixed, setFieldInt, setFieldMLString, setFieldName, setFieldObject, setFieldString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DK_DescendantFonts

public static final COSName DK_DescendantFonts

META

public static final PDFontType0.MetaClass META
The meta class instance

Constructor Detail

PDFontType0

public PDFontType0(COSObject object)
Method Detail

getCMap

public CMap getCMap()
The CMap associated with the Type0 font. The CMap defines a mapping from code points to character selectors.

Returns:
The CMap associated with the Type0 font.

getDescendantFont

public CIDFont getDescendantFont()
The descendant font (font program) for the Type0 font.

Returns:
The descendant font (font program) for the Type0 font.

getFontDescriptor

public PDFontDescriptor getFontDescriptor()
Description copied from class: PDFont
The PDFontDescriptor object for this font.

Overrides:
getFontDescriptor in class PDFont
Returns:
The PDFontDescriptor object for this font

getFontFamilyName

public String getFontFamilyName()
Overrides:
getFontFamilyName in class PDFont

getFontName

public String getFontName()
Overrides:
getFontName in class PDFont

getFontNameNormalized

public String getFontNameNormalized()
Overrides:
getFontNameNormalized in class PDFont

getFontStyle

public PDFontStyle getFontStyle()
Overrides:
getFontStyle in class PDFont

getFontType

public String getFontType()
Specified by:
getFontType in class PDFont

getGlyphIndex

public int getGlyphIndex(int cid)

getGlyphsEncoded

public PDGlyphs getGlyphsEncoded(int codepoint)
Description copied from class: PDFont
The PDGlyphs instance for the encoded codepoint.

Specified by:
getGlyphsEncoded in class PDFont
Returns:
The PDGlyphs instance for the encoded codepoint.

getGlyphWidthEncoded

public int getGlyphWidthEncoded(int codePoint)
Description copied from class: PDFont
The glyph width of an encoded codepoint in the font.

In the standard case for single byte encoded fonts, the codepoint is the index in the /Widths array, holding the glyph width.

For multibyte fonts, see PDFontType0.

Specified by:
getGlyphWidthEncoded in class PDFont
Parameters:
codePoint - The codepoint
Returns:
The glyph width of an encoded codepoint in the font

getNextGlyphsEncoded

public PDGlyphs getNextGlyphsEncoded(ByteArrayInputStream is)
                              throws IOException
Description copied from class: PDFont
The PDGlyphs denoted by the next byte or bytes in the input stream.

For single byte encoded fonts a single byte is read and the associated PDGlyphs is returned. For CID fonts, the appropriate number of bytes is read form the input stream to select the PDGlyphs.

Specified by:
getNextGlyphsEncoded in class PDFont
Parameters:
is - The input stream on the COSString bytes
Returns:
The next PDGlyphs referenced by the input stream.
Throws:
IOException

setDescendantFont

public void setDescendantFont(CIDFont font)

jPod PDF library

Copyright © 2008 intarsys consulting GmbH. All Rights Reserved.