com.sun.pdfview.font

Class TTFFont

public class TTFFont extends OutlineFont

A true-type font
Constructor Summary
TTFFont(String baseFont, PDFObject fontObj, PDFFontDescriptor descriptor)
create a new TrueTypeFont object based on a description of the font from the PDF file.
Method Summary
protected GeneralPathgetOutline(char src, float width)
Get the outline of a character given the character code
protected GeneralPathgetOutline(String name, float width)
Get the outline of a character given the character name
protected GeneralPathgetOutline(int glyphId, float width)
Get the outline of a character given the glyph id
protected GeneralPathrenderCompoundGlyph(GlyfTable glyf, GlyfCompound g)
Render a compound glyf
protected GeneralPathrenderSimpleGlyph(GlyfSimple g)
Render a simple glyf

Constructor Detail

TTFFont

public TTFFont(String baseFont, PDFObject fontObj, PDFFontDescriptor descriptor)
create a new TrueTypeFont object based on a description of the font from the PDF file. If the description happens to contain an in-line true-type font file (under key "FontFile2"), use the true type font. Otherwise, parse the description for key information and use that to generate an appropriate font.

Method Detail

getOutline

protected GeneralPath getOutline(char src, float width)
Get the outline of a character given the character code

getOutline

protected GeneralPath getOutline(String name, float width)
Get the outline of a character given the character name

getOutline

protected GeneralPath getOutline(int glyphId, float width)
Get the outline of a character given the glyph id

renderCompoundGlyph

protected GeneralPath renderCompoundGlyph(GlyfTable glyf, GlyfCompound g)
Render a compound glyf

renderSimpleGlyph

protected GeneralPath renderSimpleGlyph(GlyfSimple g)
Render a simple glyf