org.apache.pdfbox.pdmodel.font
Class PDType3Font

java.lang.Object
  extended by org.apache.pdfbox.pdmodel.font.PDFont
      extended by org.apache.pdfbox.pdmodel.font.PDSimpleFont
          extended by org.apache.pdfbox.pdmodel.font.PDType3Font
All Implemented Interfaces:
COSObjectable

public class PDType3Font
extends PDSimpleFont

This is implementation of the Type3 Font.

Version:
$Revision: 1.8 $
Author:
Ben Litchfield

Field Summary
 
Fields inherited from class org.apache.pdfbox.pdmodel.font.PDFont
cmap, cmapObjects, font, fontMatrix, resourceRootCMAP, toUnicodeCmap
 
Constructor Summary
PDType3Font()
          Constructor.
PDType3Font(COSDictionary fontDictionary)
          Constructor.
 
Method Summary
 void drawString(java.lang.String string, int[] codePoints, java.awt.Graphics g, float fontSize, java.awt.geom.AffineTransform at, float x, float y)
          This will draw a string on a canvas using the font.
 void setFontMatrix(PDMatrix matrix)
          Set the font matrix for this type3 font.
 
Methods inherited from class org.apache.pdfbox.pdmodel.font.PDSimpleFont
determineEncoding, getAverageFontWidth, getawtFont, getFontBoundingBox, getFontHeight, getFontWidth, getToUnicode, isFontSubstituted, setIsFontSubstituted, setToUnicode, writeFont
 
Methods inherited from class org.apache.pdfbox.pdmodel.font.PDFont
clearResources, cmapEncoding, drawString, encode, encodeToCID, equals, getAFM, getAverageFontWidthFromAFMFile, getBaseFont, getCodeFromArray, getCOSObject, getEncoding, getFirstChar, getFontDescriptor, getFontEncoding, getFontMatrix, getFontWidth, getFontWidthFromAFMFile, getLastChar, getStringWidth, getSubType, getType, getWidths, hashCode, hasToUnicode, isType0Font, isType1Font, parseCmap, setBaseFont, setEncoding, setFirstChar, setFontDescriptor, setFontEncoding, setHasToUnicode, setLastChar, setWidths
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PDType3Font

public PDType3Font()
Constructor.


PDType3Font

public PDType3Font(COSDictionary fontDictionary)
Constructor.

Parameters:
fontDictionary - The font dictionary according to the PDF specification.
Method Detail

drawString

public void drawString(java.lang.String string,
                       int[] codePoints,
                       java.awt.Graphics g,
                       float fontSize,
                       java.awt.geom.AffineTransform at,
                       float x,
                       float y)
                throws java.io.IOException
This will draw a string on a canvas using the font.

Overrides:
drawString in class PDSimpleFont
Parameters:
string - The string to draw.
codePoints - The codePoints of the given string.
g - The graphics to draw onto.
fontSize - The size of the font to draw.
at - The transformation matrix with all information for scaling and shearing of the font.
x - The x coordinate to draw at.
y - The y coordinate to draw at.
Throws:
java.io.IOException - If there is an error drawing the specific string.

setFontMatrix

public void setFontMatrix(PDMatrix matrix)
Set the font matrix for this type3 font.

Parameters:
matrix - The font matrix for this type3 font.