intarsys PDF library API

de.intarsys.pdf.font
Class PDFontTrueType

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.PDFontTrueType
All Implemented Interfaces:
IFont, ICOSObjectListener, IAttributeSupport

public class PDFontTrueType
extends PDFont

basic implementation for true type support

todo 2 review initialization (sequence problems)


Nested Class Summary
static class PDFontTrueType.MetaClass
          The meta class implementation
 
Field Summary
static PDFontTrueType.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
 void compress()
           
static PDFontTrueType createNew(de.intarsys.font.truetype.TTFont ttFont)
          create a TrueType font object to be used in the pdf document
 void embedFontProgramm()
           
 String getFontFamilyName()
          The font family name.
static String getFontFamilyName(String name)
           
 String getFontName()
          The complete font name.
 FontStyle getFontStyle()
          The font style.
static FontStyle getFontStyle(String name)
           
 CID getNextCID(byte[] bytes, int offset)
           
 de.intarsys.font.truetype.TTFont getTTFont()
           
 int getTTGlyphWidth(int codePoint)
          returns the glyph width from the TT font with units and cmap to glyph indexing resolved
 float getUnderlinePosition()
           
 int getUnderlineThickness()
           
 void initializeFromScratchFontDescriptor()
           
 void removeFontProgramm()
           
 void setTTFont(de.intarsys.font.truetype.TTFont font)
           
 
Methods inherited from class de.intarsys.pdf.font.PDFont
getBaseFont, getEncoding, getFirstChar, getFontDescriptor, getFontName, getGlyphWidth, getGlyphWidths, getLastChar, getMacintoshRomanCode, getMissingWidth, getToUnicode, getUnicode, isCharUsed, isEmbedded, isStandardFont, isSubset, setBaseFont, setCharUsed, setEncoding, setFontDescriptor, 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, invalidateCaches, 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

META

public static final PDFontTrueType.MetaClass META
The meta class instance

Method Detail

getFontFamilyName

public static String getFontFamilyName(String name)

getFontStyle

public static FontStyle getFontStyle(String name)

createNew

public static PDFontTrueType createNew(de.intarsys.font.truetype.TTFont ttFont)
create a TrueType font object to be used in the pdf document

Parameters:
ttFont - the baseFontName of the font to use
Returns:
the new font created

getFontFamilyName

public String getFontFamilyName()
Description copied from interface: IFont
The font family name.

Returns:
The font family name.

getFontName

public String getFontName()
Description copied from interface: IFont
The complete font name.

Returns:
The complete font name.

getFontStyle

public FontStyle getFontStyle()
Description copied from interface: IFont
The font style.

Returns:
The font style.

getNextCID

public CID getNextCID(byte[] bytes,
                      int offset)
Specified by:
getNextCID in class PDFont

getUnderlinePosition

public float getUnderlinePosition()
Specified by:
getUnderlinePosition in class PDFont

getUnderlineThickness

public int getUnderlineThickness()
Specified by:
getUnderlineThickness in class PDFont

getTTGlyphWidth

public int getTTGlyphWidth(int codePoint)
returns the glyph width from the TT font with units and cmap to glyph indexing resolved


compress

public void compress()
Overrides:
compress in class PDFont

embedFontProgramm

public void embedFontProgramm()

removeFontProgramm

public void removeFontProgramm()

setTTFont

public void setTTFont(de.intarsys.font.truetype.TTFont font)

getTTFont

public de.intarsys.font.truetype.TTFont getTTFont()

initializeFromScratchFontDescriptor

public void initializeFromScratchFontDescriptor()

intarsys PDF library API

Copyright © 2006 intarsys consulting GmbH. All Rights Reserved.