<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
<document> 
  <header> 
    <title>PDFBox - PDF Fonts</title> 
  </header> 
  <body> 
  	<section>
  		<title>Standard 14 Fonts</title>
  		<p>
  		The PDF specification states that a standard set of 14 fonts will always be available when consuming
  		PDF documents.  In PDFBox these are defined as constants in the PDType1Font class.
  		</p>
  		<table>
  			<tr><th>Standard Font</th></tr>
  			<tr><td>PDType1Font.TIMES_ROMAN</td></tr>
  			<tr><td>PDType1Font.TIMES_BOLD</td></tr>
  			<tr><td>PDType1Font.TIMES_ITALIC</td></tr>
  			<tr><td>PDType1Font.TIMES_BOLD_ITALIC</td></tr>
  			<tr><td>PDType1Font.HELVETICA</td></tr>
  			<tr><td>PDType1Font.HELVETICA_BOLD</td></tr>
  			<tr><td>PDType1Font.HELVETICA_OBLIQUE</td></tr>
  			<tr><td>PDType1Font.HELVETICA_BOLD_OBLIQUE</td></tr>
  			<tr><td>PDType1Font.COURIER</td></tr>
  			<tr><td>PDType1Font.COURIER_BOLD</td></tr>
  			<tr><td>PDType1Font.COURIER_OBLIQUE</td></tr>
  			<tr><td>PDType1Font.COURIER_BOLD_OBLIQUE</td></tr>
  			<tr><td>PDType1Font.SYMBOL</td></tr>
  			<tr><td>PDType1Font.ZAPF_DINGBATS</td></tr>
  		</table>
  	</section>
    <section>
      <title>TrueType Fonts</title>
      <section>
      	<title>Embedding TrueType Fonts</title>
      	<p>
      	PDFBox supports embedding TrueType fonts.  Loading a new font is easy.
      	</p>
      <source>
      PDDocument doc = PDDocument.load( ... );
      PDFont font = PDTrueTypeFont.loadTTF( doc, new File( "SpecialFont.ttf" ) );</source>
      	
      </section>
      <section>
      	<title>External TrueType Fonts</title>
      	<p>
      	While it is recommended to embed all fonts for greatest portability not all PDF producer applications
      	will do this.  When displaying a PDF it is necessary to find an external font to use.  
      	PDFBox will look for a mapping file to use when substituting fonts.<br />
      	<br/>
      	PDFBox will load <i>Resources/PDFBox_External_Fonts.properties</i> off of the classpath to map
      	font names to TTF font files.  The <i>UNKNOWN_FONT</i> property in that file will tell PDFBox which font
      	to use when no mapping exists.
      	</p>
      </section>
    </section>
  </body>
</document>
