/** * Loads a TTF to be embedded into a document as a simple font. * * <p> * <b>Note:</b> Simple fonts only support 256 characters. For Unicode support, use * {@link PDType0Font#load(PDDocument, InputStream)} instead. * </p> * * @param doc The PDF document that will hold the embedded font. * @param ttf A true type font * @param encoding The PostScript encoding vector to be used for embedding. * @return a PDTrueTypeFont instance. * @throws IOException If there is an error loading the data. */ public static PDTrueTypeFont load(PDDocument doc, TrueTypeFont ttf, Encoding encoding) throws IOException { return new PDTrueTypeFont(doc, ttf, encoding, false); }
/** * Loads a TTF to be embedded into a document as a simple font. * * <p><b>Note:</b> Simple fonts only support 256 characters. For Unicode support, use * {@link PDType0Font#load(PDDocument, InputStream)} instead.</p> * * @param doc The PDF document that will hold the embedded font. * @param input A TTF file stream * @param encoding The PostScript encoding vector to be used for embedding. * @return a PDTrueTypeFont instance. * @throws IOException If there is an error loading the data. */ public static PDTrueTypeFont load(PDDocument doc, InputStream input, Encoding encoding) throws IOException { return new PDTrueTypeFont(doc, new TTFParser().parse(input), encoding, true); }
/** * Loads a TTF to be embedded into a document as a simple font. * * <p><b>Note:</b> Simple fonts only support 256 characters. For Unicode support, use * {@link PDType0Font#load(PDDocument, File)} instead.</p> * * @param doc The PDF document that will hold the embedded font. * @param file A TTF file. * @param encoding The PostScript encoding vector to be used for embedding. * @return a PDTrueTypeFont instance. * @throws IOException If there is an error loading the data. */ public static PDTrueTypeFont load(PDDocument doc, File file, Encoding encoding) throws IOException { return new PDTrueTypeFont(doc, new TTFParser().parse(file), encoding, true); }
/** * Loads a TTF to be embedded into a document as a simple font. * * <p> * <b>Note:</b> Simple fonts only support 256 characters. For Unicode support, use * {@link PDType0Font#load(PDDocument, InputStream)} instead. * </p> * * @param doc The PDF document that will hold the embedded font. * @param ttf A true type font * @param encoding The PostScript encoding vector to be used for embedding. * @return a PDTrueTypeFont instance. * @throws IOException If there is an error loading the data. */ public static PDTrueTypeFont load(PDDocument doc, TrueTypeFont ttf, Encoding encoding) throws IOException { return new PDTrueTypeFont(doc, ttf, encoding, false); }
/** * Loads a TTF to be embedded into a document as a simple font. * * <p> * <b>Note:</b> Simple fonts only support 256 characters. For Unicode support, use * {@link PDType0Font#load(PDDocument, InputStream)} instead. * </p> * * @param doc The PDF document that will hold the embedded font. * @param ttf A true type font * @param encoding The PostScript encoding vector to be used for embedding. * @return a PDTrueTypeFont instance. * @throws IOException If there is an error loading the data. */ public static PDTrueTypeFont load(PDDocument doc, TrueTypeFont ttf, Encoding encoding) throws IOException { return new PDTrueTypeFont(doc, ttf, encoding, false); }
return new PDTrueTypeFont(dictionary);
/** * Loads a TTF to be embedded into a document as a simple font. Only supports WinAnsiEncoding. * * @param doc The PDF document that will hold the embedded font. * @param file A TTF file. * @return a PDTrueTypeFont instance. * @throws IOException If there is an error loading the data. * * @deprecated Use {@link PDType0Font#load(PDDocument, File)} instead. */ @Deprecated public static PDTrueTypeFont loadTTF(PDDocument doc, File file) throws IOException { return new PDTrueTypeFont(doc, new TTFParser().parse(file), WinAnsiEncoding.INSTANCE, true); }
/** * Loads a TTF to be embedded into a document as a simple font. Only supports WinAnsiEncoding. * * @param doc The PDF document that will hold the embedded font. * @param input A TTF file stream * @return a PDTrueTypeFont instance. * @throws IOException If there is an error loading the data. * * @deprecated Use {@link PDType0Font#load(PDDocument, InputStream)} instead. */ @Deprecated public static PDTrueTypeFont loadTTF(PDDocument doc, InputStream input) throws IOException { return new PDTrueTypeFont(doc, new TTFParser().parse(input), WinAnsiEncoding.INSTANCE, true); }
/** * Loads a TTF to be embedded into a document as a simple font. Only supports WinAnsiEncoding. * * @param doc The PDF document that will hold the embedded font. * @param file A TTF file. * @return a PDTrueTypeFont instance. * @throws IOException If there is an error loading the data. * * @deprecated Use {@link PDType0Font#load(PDDocument, File)} instead. */ @Deprecated public static PDTrueTypeFont loadTTF(PDDocument doc, File file) throws IOException { return new PDTrueTypeFont(doc, new TTFParser().parse(file), WinAnsiEncoding.INSTANCE, true); }
/** * Loads a TTF to be embedded into a document as a simple font. Only supports WinAnsiEncoding. * * @param doc The PDF document that will hold the embedded font. * @param input A TTF file stream * @return a PDTrueTypeFont instance. * @throws IOException If there is an error loading the data. * * @deprecated Use {@link PDType0Font#load(PDDocument, InputStream)} instead. */ @Deprecated public static PDTrueTypeFont loadTTF(PDDocument doc, InputStream input) throws IOException { return new PDTrueTypeFont(doc, new TTFParser().parse(input), WinAnsiEncoding.INSTANCE, true); }
/** * Loads a TTF to be embedded into a document as a simple font. * * <p><b>Note:</b> Simple fonts only support 256 characters. For Unicode support, use * {@link PDType0Font#load(PDDocument, File)} instead.</p> * * @param doc The PDF document that will hold the embedded font. * @param file A TTF file. * @param encoding The PostScript encoding vector to be used for embedding. * @return a PDTrueTypeFont instance. * @throws IOException If there is an error loading the data. */ public static PDTrueTypeFont load(PDDocument doc, File file, Encoding encoding) throws IOException { return new PDTrueTypeFont(doc, new TTFParser().parse(file), encoding, true); }
/** * Loads a TTF to be embedded into a document as a simple font. * * <p><b>Note:</b> Simple fonts only support 256 characters. For Unicode support, use * {@link PDType0Font#load(PDDocument, InputStream)} instead.</p> * * @param doc The PDF document that will hold the embedded font. * @param input A TTF file stream * @param encoding The PostScript encoding vector to be used for embedding. * @return a PDTrueTypeFont instance. * @throws IOException If there is an error loading the data. */ public static PDTrueTypeFont load(PDDocument doc, InputStream input, Encoding encoding) throws IOException { return new PDTrueTypeFont(doc, new TTFParser().parse(input), encoding, true); }
/** * Loads a TTF to be embedded into a document as a simple font. * * <p><b>Note:</b> Simple fonts only support 256 characters. For Unicode support, use * {@link PDType0Font#load(PDDocument, InputStream)} instead.</p> * * @param doc The PDF document that will hold the embedded font. * @param input A TTF file stream * @param encoding The PostScript encoding vector to be used for embedding. * @return a PDTrueTypeFont instance. * @throws IOException If there is an error loading the data. */ public static PDTrueTypeFont load(PDDocument doc, InputStream input, Encoding encoding) throws IOException { return new PDTrueTypeFont(doc, new TTFParser().parse(input), encoding, true); }
/** * Loads a TTF to be embedded into a document as a simple font. * * <p><b>Note:</b> Simple fonts only support 256 characters. For Unicode support, use * {@link PDType0Font#load(PDDocument, File)} instead.</p> * * @param doc The PDF document that will hold the embedded font. * @param file A TTF file. * @param encoding The PostScript encoding vector to be used for embedding. * @return a PDTrueTypeFont instance. * @throws IOException If there is an error loading the data. */ public static PDTrueTypeFont load(PDDocument doc, File file, Encoding encoding) throws IOException { return new PDTrueTypeFont(doc, new TTFParser().parse(file), encoding, true); }
return new PDTrueTypeFont(dictionary);
return new PDTrueTypeFont(dictionary);