[#5705] - fontFamily in fonts.xml should supports normalPdfFont etc.

Category:
Feature request
Priority:
High
Status:
New
Project: Severity:
Critical
Resolution:
Open
Component: Reproducibility:
Always
Assigned to:

normalPdfFont,boldPdfFont,italicPdfFont,boldItalicPdfFont should be supported like pdfEncoding,pdfEmbedded

<?xml version="1.0" encoding="UTF-8"?>
<fontFamilies>
<fontFamily name="宋体">
<normalPdfFont>STSong-Light</normalPdfFont>
<boldPdfFont>STSong-Light</boldPdfFont>
<italicPdfFont>STSong-Light</italicPdfFont>
<boldItalicPdfFont>STSong-Light</boldItalicPdfFont>
<pdfEncoding>UniGB-UCS2-H</pdfEncoding>
<pdfEmbedded>true</pdfEmbedded>
<exportFonts>
<export key="net.sf.jasperreports.html">'宋体', Arial, Helvetica, sans-serif</export>
<export key="net.sf.jasperreports.xhtml">'宋体', Arial, Helvetica, sans-serif</export>
</exportFonts>
</fontFamily>
</fontFamilies>

Index: src/net/sf/jasperreports/engine/fonts/SimpleFontExtensionHelper.java
===================================================================
--- src/net/sf/jasperreports/engine/fonts/SimpleFontExtensionHelper.java
+++ src/net/sf/jasperreports/engine/fonts/SimpleFontExtensionHelper.java (working copy)
@@ +80,10 +80,6 @@
private static final String NODE_bold = "bold";
private static final String NODE_italic = "italic";
private static final String NODE_boldItalic = "boldItalic";
+ private static final String NODE_normalPdfFont = "normalPdfFont";
+ private static final String NODE_boldPdfFont = "boldPdfFont";
+ private static final String NODE_italicPdfFont = "italicPdfFont";
+ private static final String NODE_boldItalicPdfFont = "boldItalicPdfFont";
private static final String NODE_pdfEncoding = "pdfEncoding";
private static final String NODE_pdfEmbedded = "pdfEmbedded";
private static final String NODE_exportFonts = "exportFonts";
@@ +258,22 +254,6 @@
{
fontFamily.setBoldItalic(node.getTextContent());
}
+ else if (NODE_normalPdfFont.equals(node.getNodeName()))
+ {
+ fontFamily.setNormalPdfFont(node.getTextContent());
+ }
+ else if (NODE_boldPdfFont.equals(node.getNodeName()))
+ {
+ fontFamily.setBoldPdfFont(node.getTextContent());
+ }
+ else if (NODE_italicPdfFont.equals(node.getNodeName()))
+ {
+ fontFamily.setItalicPdfFont(node.getTextContent());
+ }
+ else if (NODE_boldItalicPdfFont.equals(node.getNodeName()))
+ {
+ fontFamily.setBoldItalicPdfFont(node.getTextContent());
+ }
else if (NODE_pdfEncoding.equals(node.getNodeName()))
{
fontFamily.setPdfEncoding(node.getTextContent());

attachment is the resolution.

AttachmentSize
File SimpleFontExtensionHelper.java14.82 KB
quaff's picture
1
Joined: Apr 1 2012 - 3:59am
Last seen: 8 years 7 months ago

3 Comments:

#1
  • Severity:Major» Critical

System Message

#2
  • Priority:Normal» High

System Message

#3
  • Assigned:nobody» teodord

please fix this

Feedback