* @return a PDTrueTypeFont instance.
* @throws IOException If there is an error loading the data.
*/
public static PDTrueTypeFont loadTTF( PDDocument doc, InputStream stream, Encoding enc ) throws IOException
{
PDStream fontStream = new PDStream(doc, stream, false );
fontStream.getStream().setInt( COSName.LENGTH1, fontStream.getByteArray().length );
fontStream.addCompression();
//only support winansi encoding right now, should really
//just use Identity-H with unicode mapping
return PDTrueTypeFont.loadTTF(fontStream,enc);
}