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 2019/09/07 11:46:27 UTC

svn commit: r1866552 - /pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDType0Font.java

Author: tilman
Date: Sat Sep  7 11:46:27 2019
New Revision: 1866552

URL: http://svn.apache.org/viewvc?rev=1866552&view=rev
Log:
PDFBOX-4071: improve javadoc

Modified:
    pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDType0Font.java

Modified: pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDType0Font.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDType0Font.java?rev=1866552&r1=1866551&r2=1866552&view=diff
==============================================================================
--- pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDType0Font.java (original)
+++ pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDType0Font.java Sat Sep  7 11:46:27 2019
@@ -54,26 +54,28 @@ public class PDType0Font extends PDFont
     private TrueTypeFont ttf;
     
     /**
-    * Loads a TTF to be embedded into a document as a Type 0 font.
-    *
-    * @param doc The PDF document that will hold the embedded font.
-    * @param file A TrueType font.
-    * @return A Type0 font with a CIDFontType2 descendant.
-    * @throws IOException If there is an error reading the font file.
-    */
+     * Loads a TTF to be embedded and subset into a document as a Type 0 font. If you are loading a
+     * font for AcroForm, then use the 3-parameter constructor instead.
+     *
+     * @param doc The PDF document that will hold the embedded font.
+     * @param file A TrueType font.
+     * @return A Type0 font with a CIDFontType2 descendant.
+     * @throws IOException If there is an error reading the font file.
+     */
     public static PDType0Font load(PDDocument doc, File file) throws IOException
     {
         return new PDType0Font(doc, new TTFParser().parse(file), true, true, false);
     }
 
     /**
-    * Loads a TTF to be embedded into a document as a Type 0 font.
-    *
-    * @param doc The PDF document that will hold the embedded font.
-    * @param input An input stream of a TrueType font. It will be closed before returning.
-    * @return A Type0 font with a CIDFontType2 descendant.
-    * @throws IOException If there is an error reading the font stream.
-    */
+     * Loads a TTF to be embedded and subset into a document as a Type 0 font. If you are loading a
+     * font for AcroForm, then use the 3-parameter constructor instead.
+     *
+     * @param doc The PDF document that will hold the embedded font.
+     * @param input An input stream of a TrueType font. It will be closed before returning.
+     * @return A Type0 font with a CIDFontType2 descendant.
+     * @throws IOException If there is an error reading the font stream.
+     */
     public static PDType0Font load(PDDocument doc, InputStream input) throws IOException
     {
         return new PDType0Font(doc, new TTFParser().parse(input), true, true, false);
@@ -84,7 +86,8 @@ public class PDType0Font extends PDFont
      *
      * @param doc The PDF document that will hold the embedded font.
      * @param input An input stream of a TrueType font. It will be closed before returning.
-     * @param embedSubset True if the font will be subset before embedding
+     * @param embedSubset True if the font will be subset before embedding. Set this to false when
+     * creating a font for AcroForm.
      * @return A Type0 font with a CIDFontType2 descendant.
      * @throws IOException If there is an error reading the font stream.
      */
@@ -99,7 +102,8 @@ public class PDType0Font extends PDFont
      *
      * @param doc The PDF document that will hold the embedded font.
      * @param ttf A TrueType font.
-     * @param embedSubset True if the font will be subset before embedding
+     * @param embedSubset True if the font will be subset before embedding. Set this to false when
+     * creating a font for AcroForm.
      * @return A Type0 font with a CIDFontType2 descendant.
      * @throws IOException If there is an error reading the font stream.
      */