/** * This will get the font for this font setting. * * @return The font for this setting of null if one was not found. * * @throws IOException If there is an error getting the font. */ public PDFont getFont() throws IOException { PDFont retval = null; COSBase font = fontSetting.getObject(0); if( font instanceof COSDictionary ) { retval = PDFontFactory.createFont( (COSDictionary)font ); } return retval; }
if (dict != null) font = PDFontFactory.createFont(dict);
/** * Create a default font. * * @return a default font * @throws IOException if something goes wrong */ public static PDFont createDefaultFont() throws IOException { COSDictionary dict = new COSDictionary(); dict.setItem(COSName.TYPE, COSName.FONT); dict.setItem(COSName.SUBTYPE, COSName.TRUE_TYPE); dict.setString(COSName.BASE_FONT, "Arial"); return createFont(dict); } }
try newFont = PDFontFactory.createFont((COSDictionary) font);
/** * This will get the font for this font setting. * * @return The font for this setting of null if one was not found. * * @throws IOException If there is an error getting the font. */ public PDFont getFont() throws IOException { PDFont retval = null; COSBase font = fontSetting.getObject(0); if( font instanceof COSDictionary ) { retval = PDFontFactory.createFont( (COSDictionary)font ); } return retval; }
PDFont aFont = PDFontFactory.createFont(xObjFont); FontContainer<?> aContainer = this.context.getFontContainer(aFont.getCOSObject());
/** * This will get the font for this font setting. * * @return The font for this setting of null if one was not found. * * @throws IOException If there is an error getting the font. */ public PDFont getFont() throws IOException { PDFont retval = null; COSBase font = fontSetting.getObject(0); if( font instanceof COSDictionary ) { retval = PDFontFactory.createFont( (COSDictionary)font ); } return retval; }
try PDFont newFont = PDFontFactory.createFont(fontDict); ContextHelper.validateElement(context, newFont, FONT_PROCESS);
if (dict != null) font = PDFontFactory.createFont(dict);
if (dict != null) font = PDFontFactory.createFont(dict);
/** * Create a default font. * * @return a default font * @throws IOException if something goes wrong */ public static PDFont createDefaultFont() throws IOException { COSDictionary dict = new COSDictionary(); dict.setItem(COSName.TYPE, COSName.FONT); dict.setItem(COSName.SUBTYPE, COSName.TRUE_TYPE); dict.setString(COSName.BASE_FONT, "Arial"); return createFont(dict); } }
/** * Create a default font. * * @return a default font * @throws IOException if something goes wrong */ public static PDFont createDefaultFont() throws IOException { COSDictionary dict = new COSDictionary(); dict.setItem(COSName.TYPE, COSName.FONT); dict.setItem(COSName.SUBTYPE, COSName.TRUE_TYPE); dict.setString(COSName.BASE_FONT, "Arial"); return createFont(dict); } }
try newFont = PDFontFactory.createFont((COSDictionary) font);
try newFont = PDFontFactory.createFont((COSDictionary) font);
PDFont aFont = PDFontFactory.createFont(xObjFont); FontContainer<?> aContainer = this.context.getFontContainer(aFont.getCOSObject());
PDFont aFont = PDFontFactory.createFont(xObjFont); FontContainer<?> aContainer = this.context.getFontContainer(aFont.getCOSObject());
try PDFont newFont = PDFontFactory.createFont(fontDict); ContextHelper.validateElement(context, newFont, FONT_PROCESS);
try PDFont newFont = PDFontFactory.createFont(fontDict); ContextHelper.validateElement(context, newFont, FONT_PROCESS);