/** * Creates a new TrueType font for embedding. */ private PDTrueTypeFont(PDDocument document, TrueTypeFont ttf, Encoding encoding, boolean closeTTF) throws IOException { PDTrueTypeFontEmbedder embedder = new PDTrueTypeFontEmbedder(document, dict, ttf, encoding); this.encoding = encoding; this.ttf = ttf; setFontDescriptor(embedder.getFontDescriptor()); isEmbedded = true; isDamaged = false; glyphList = GlyphList.getAdobeGlyphList(); if (closeTTF) { // the TTF is fully loaded and it is safe to close the underlying data source ttf.close(); } }
/** * Creates a new TrueType font for embedding. */ private PDTrueTypeFont(PDDocument document, TrueTypeFont ttf, Encoding encoding, boolean closeTTF) throws IOException { PDTrueTypeFontEmbedder embedder = new PDTrueTypeFontEmbedder(document, dict, ttf, encoding); this.encoding = encoding; this.ttf = ttf; setFontDescriptor(embedder.getFontDescriptor()); isEmbedded = true; isDamaged = false; glyphList = GlyphList.getAdobeGlyphList(); if (closeTTF) { // the TTF is fully loaded and it is safe to close the underlying data source ttf.close(); } }
/** * Creates a new TrueType font for embedding. */ private PDTrueTypeFont(PDDocument document, TrueTypeFont ttf, Encoding encoding, boolean closeTTF) throws IOException { PDTrueTypeFontEmbedder embedder = new PDTrueTypeFontEmbedder(document, dict, ttf, encoding); this.encoding = encoding; this.ttf = ttf; setFontDescriptor(embedder.getFontDescriptor()); isEmbedded = true; isDamaged = false; glyphList = GlyphList.getAdobeGlyphList(); if (closeTTF) { // the TTF is fully loaded and it is save to close the underlying data source ttf.close(); } }