jPod PDF library

de.intarsys.pdf.font
Class CIDFont

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.CIDFont
All Implemented Interfaces:
ICOSObjectListener, de.intarsys.tools.attribute.IAttributeSupport
Direct Known Subclasses:
CIDFontType0, CIDFontType2

public abstract class CIDFont
extends PDFont

A CID indexed font.

This is a wrapper around a Type 1 or TrueType Font that is indexed using CID's.

This is a a subclass of PDFont only for implementation reasons.


Nested Class Summary
static class CIDFont.MetaClass
          The meta class implementation
 
Field Summary
static COSName DK_CIDSystemInfo
           
static COSName DK_DW
           
static COSName DK_DW2
           
static COSName DK_W
           
static COSName DK_W2
           
static CIDFont.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
 
Method Summary
 CIDSystemInfo getCIDSystemInfo()
           
 CIDWidthMap getCIDWidthMap()
           
 int getDefaultGlyphWidth()
           
 PDFontStyle getFontStyle()
           
abstract  int getGlyphIndex(int cid)
           
 PDGlyphs getGlyphsEncoded(int codepoint)
          The PDGlyphs instance for the encoded codepoint.
 int getGlyphWidthCID(int cid)
           
 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 setCIDSystemInfo(CIDSystemInfo info)
           
 void setCIDWidthMap(CIDWidthMap map)
           
 void setDefaultGlyphWidth(int value)
           
 
Methods inherited from class de.intarsys.pdf.font.PDFont
dumpFontFile, getBaseFont, getEncoding, getFirstChar, getFontDescriptor, getFontFamilyName, getFontFamilyName, getFontName, getFontName, getFontNameNormalized, getFontStyle, getFontType, 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_CIDSystemInfo

public static final COSName DK_CIDSystemInfo

DK_DW

public static final COSName DK_DW

DK_W

public static final COSName DK_W

DK_DW2

public static final COSName DK_DW2

DK_W2

public static final COSName DK_W2

META

public static final CIDFont.MetaClass META
The meta class instance

Method Detail

getCIDSystemInfo

public CIDSystemInfo getCIDSystemInfo()

getCIDWidthMap

public CIDWidthMap getCIDWidthMap()

getDefaultGlyphWidth

public int getDefaultGlyphWidth()

getFontStyle

public PDFontStyle getFontStyle()
Overrides:
getFontStyle in class PDFont

getGlyphIndex

public abstract 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.

getGlyphWidthCID

public int getGlyphWidthCID(int cid)

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)
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.

setCIDSystemInfo

public void setCIDSystemInfo(CIDSystemInfo info)

setCIDWidthMap

public void setCIDWidthMap(CIDWidthMap map)

setDefaultGlyphWidth

public void setDefaultGlyphWidth(int value)

jPod PDF library

Copyright © 2008 intarsys consulting GmbH. All Rights Reserved.