You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2015/09/22 21:59:06 UTC
svn commit: r1704712 -
/pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/ttf/TTFParser.java
Author: tilman
Date: Tue Sep 22 19:59:04 2015
New Revision: 1704712
URL: http://svn.apache.org/viewvc?rev=1704712&view=rev
Log:
PDFBOX-2986: improve javadoc
Modified:
pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/ttf/TTFParser.java
Modified: pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/ttf/TTFParser.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/ttf/TTFParser.java?rev=1704712&r1=1704711&r2=1704712&view=diff
==============================================================================
--- pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/ttf/TTFParser.java (original)
+++ pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/ttf/TTFParser.java Tue Sep 22 19:59:04 2015
@@ -61,11 +61,11 @@ public class TTFParser
}
/**
- * Parse a file and get a true type font.
+ * Parse a file and return a TrueType font.
*
- * @param ttfFile The TTF file.
- * @return A true type font.
- * @throws IOException If there is an error parsing the true type font.
+ * @param ttfFile The TrueType font filename.
+ * @return A TrueType font.
+ * @throws IOException If there is an error parsing the TrueType font.
*/
public TrueTypeFont parse(String ttfFile) throws IOException
{
@@ -73,11 +73,11 @@ public class TTFParser
}
/**
- * Parse a file and get a true type font.
+ * Parse a file and return a TrueType font.
*
- * @param ttfFile The TTF file.
- * @return A true type font.
- * @throws IOException If there is an error parsing the true type font.
+ * @param ttfFile The TrueType font file.
+ * @return A TrueType font.
+ * @throws IOException If there is an error parsing the TrueType font.
*/
public TrueTypeFont parse(File ttfFile) throws IOException
{
@@ -107,24 +107,24 @@ public class TTFParser
}
/**
- * Parse a file and get a true type font.
+ * Parse an input stream and return a TrueType font that is to be embedded.
*
- * @param ttfData The TTF data to parse.
- * @return A true type font.
- * @throws IOException If there is an error parsing the true type font.
+ * @param inputStream The TTF data stream to parse from. It will be closed before returning.
+ * @return A TrueType font.
+ * @throws IOException If there is an error parsing the TrueType font.
*/
- public TrueTypeFont parseEmbedded(InputStream ttfData) throws IOException
+ public TrueTypeFont parseEmbedded(InputStream inputStream) throws IOException
{
this.isEmbedded = true;
- return parse(new MemoryTTFDataStream(ttfData));
+ return parse(new MemoryTTFDataStream(inputStream));
}
/**
* Parse a file and get a true type font.
*
* @param raf The TTF file.
- * @return A true type font.
- * @throws IOException If there is an error parsing the true type font.
+ * @return A TrueType font.
+ * @throws IOException If there is an error parsing the TrueType font.
*/
TrueTypeFont parse(TTFDataStream raf) throws IOException
{
@@ -158,7 +158,7 @@ public class TTFParser
*
* @param font the TrueTypeFont instance holding the parsed data.
* @param raf the data stream of the to be parsed ttf font
- * @throws IOException If there is an error parsing the true type font.
+ * @throws IOException If there is an error parsing the TrueType font.
*/
private void parseTables(TrueTypeFont font, TTFDataStream raf) throws IOException
{