org.apache.fontbox.ttf
Class TTFParser

java.lang.Object
  extended by org.apache.fontbox.ttf.TTFParser

public class TTFParser
extends java.lang.Object

A true type font file parser.

Version:
$Revision: 1.2 $
Author:
Ben Litchfield (ben@benlitchfield.com)

Constructor Summary
TTFParser()
           
 
Method Summary
static void main(java.lang.String[] args)
          A simple command line program to test parsing of a TTF file.
 TrueTypeFont parseTTF(java.io.File ttfFile)
          Parse a file and get a true type font.
 TrueTypeFont parseTTF(java.io.InputStream ttfData)
          Parse a file and get a true type font.
 TrueTypeFont parseTTF(java.lang.String ttfFile)
          Parse a file and get a true type font.
 TrueTypeFont parseTTF(TTFDataStream raf)
          Parse a file and get a true type font.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TTFParser

public TTFParser()
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
A simple command line program to test parsing of a TTF file.
usage: java org.pdfbox.ttf.TTFParser <ttf-file>

Parameters:
args - The command line arguments.
Throws:
java.io.IOException - If there is an error while parsing the font file.

parseTTF

public TrueTypeFont parseTTF(java.lang.String ttfFile)
                      throws java.io.IOException
Parse a file and get a true type font.

Parameters:
ttfFile - The TTF file.
Returns:
A true type font.
Throws:
java.io.IOException - If there is an error parsing the true type font.

parseTTF

public TrueTypeFont parseTTF(java.io.File ttfFile)
                      throws java.io.IOException
Parse a file and get a true type font.

Parameters:
ttfFile - The TTF file.
Returns:
A true type font.
Throws:
java.io.IOException - If there is an error parsing the true type font.

parseTTF

public TrueTypeFont parseTTF(java.io.InputStream ttfData)
                      throws java.io.IOException
Parse a file and get a true type font.

Parameters:
ttfData - The TTF data to parse.
Returns:
A true type font.
Throws:
java.io.IOException - If there is an error parsing the true type font.

parseTTF

public TrueTypeFont parseTTF(TTFDataStream raf)
                      throws java.io.IOException
Parse a file and get a true type font.

Parameters:
raf - The TTF file.
Returns:
A true type font.
Throws:
java.io.IOException - If there is an error parsing the true type font.


Copyright © 2008-2011 Apache Software Foundation. All Rights Reserved.