/** * Sets a <tt>JRFont</tt> object containing all font properties for this text element * * @deprecated */ public void setFont(JRFont font) { setReportFont(font.getReportFont()); setFontName(font.getOwnFontName()); setBold(font.isOwnBold()); setItalic(font.isOwnItalic()); setUnderline(font.isOwnUnderline()); setStrikeThrough(font.isOwnStrikeThrough()); setFontSize(font.getOwnSize()); setPdfFontName(font.getOwnPdfFontName()); setPdfEncoding(font.getOwnPdfEncoding()); setPdfEmbedded(font.isOwnPdfEmbedded()); }
protected void exportFont(JRFont font) throws IOException { if (font != null) { xmlWriter.startElement(JRXmlConstants.ELEMENT_font); xmlWriter.addEncodedAttribute(JRXmlConstants.ATTRIBUTE_fontName, font.getOwnFontName()); xmlWriter.addAttribute(JRXmlConstants.ATTRIBUTE_size, font.getOwnFontSize()); xmlWriter.addAttribute(JRXmlConstants.ATTRIBUTE_isBold, font.isOwnBold()); xmlWriter.addAttribute(JRXmlConstants.ATTRIBUTE_isItalic, font.isOwnItalic()); xmlWriter.addAttribute(JRXmlConstants.ATTRIBUTE_isUnderline, font.isOwnUnderline()); xmlWriter.addAttribute(JRXmlConstants.ATTRIBUTE_isStrikeThrough, font.isOwnStrikeThrough()); xmlWriter.addEncodedAttribute(JRXmlConstants.ATTRIBUTE_pdfFontName, font.getOwnPdfFontName()); xmlWriter.addEncodedAttribute(JRXmlConstants.ATTRIBUTE_pdfEncoding, font.getOwnPdfEncoding()); xmlWriter.addAttribute(JRXmlConstants.ATTRIBUTE_isPdfEmbedded, font.isOwnPdfEmbedded()); xmlWriter.closeElement(true); } }