/** * set the name for the font (i.e. Arial). * If the font doesn't exist (because it isn't installed on the system), * or the charset is invalid for that font, then another font should * be substituted. * The string length for this attribute shall be 0 to 31 characters. * Default font name is Calibri. * * @param name - value representing the name of the font to use * @see #DEFAULT_FONT_NAME */ public void setFontName(String name) { CTFontName fontName = _ctFont.sizeOfNameArray() == 0 ? _ctFont.addNewName() : _ctFont.getNameArray(0); fontName.setVal(name == null ? DEFAULT_FONT_NAME : name); }
if(pr.sizeOfRFontArray() > 0) ctFont.addNewName().setVal(pr.getRFontArray(0).getVal()); if(pr.sizeOfFamilyArray() > 0) ctFont.addNewFamily().setVal(pr.getFamilyArray(0).getVal()); if(pr.sizeOfSchemeArray() > 0) ctFont.addNewScheme().setVal(pr.getSchemeArray(0).getVal());
/** * set the name for the font (i.e. Arial). * If the font doesn't exist (because it isn't installed on the system), * or the charset is invalid for that font, then another font should * be substituted. * The string length for this attribute shall be 0 to 31 characters. * Default font name is Calibri. * * @param name - value representing the name of the font to use * @see #DEFAULT_FONT_NAME */ public void setFontName(String name) { CTFontName fontName = _ctFont.sizeOfNameArray() == 0 ? _ctFont.addNewName() : _ctFont.getNameArray(0); fontName.setVal(name == null ? DEFAULT_FONT_NAME : name); }
/** * set the name for the font (i.e. Arial). * If the font doesn't exist (because it isn't installed on the system), * or the charset is invalid for that font, then another font should * be substituted. * The string length for this attribute shall be 0 to 31 characters. * Default font name is Calibri. * * @param name - value representing the name of the font to use * @see #DEFAULT_FONT_NAME */ public void setFontName(String name) { CTFontName fontName = _ctFont.sizeOfNameArray() == 0 ? _ctFont.addNewName() : _ctFont.getNameArray(0); fontName.setVal(name == null ? DEFAULT_FONT_NAME : name); }
if(pr.sizeOfRFontArray() > 0) ctFont.addNewName().setVal(pr.getRFontArray(0).getVal()); if(pr.sizeOfFamilyArray() > 0) ctFont.addNewFamily().setVal(pr.getFamilyArray(0).getVal()); if(pr.sizeOfSchemeArray() > 0) ctFont.addNewScheme().setVal(pr.getSchemeArray(0).getVal());
if(pr.sizeOfRFontArray() > 0) ctFont.addNewName().setVal(pr.getRFontArray(0).getVal()); if(pr.sizeOfFamilyArray() > 0) ctFont.addNewFamily().setVal(pr.getFamilyArray(0).getVal()); if(pr.sizeOfSchemeArray() > 0) ctFont.addNewScheme().setVal(pr.getSchemeArray(0).getVal());