[#8991] - The same text in different fonts cannot be covered by textbox in doc

Category:
Bug report
Priority:
High
Status:
New
Project: Severity:
Major
Resolution:
Open
Component: Reproducibility:
Always
Assigned to:

I add two text element in detail band and set the expression, the font of them is "宋体", then click "stretch over flow".
After adding "simsun.ttf" file into jasperreports-fonts-6.2.2.jar, I run my program to export the report to doc and pdf.
The pdf shows normal, but doc doesn't.
When the text content is more than two rows, the textbox in doc cannot cover all the character unless you resize it.The longer
the text, the more character will be uncovered. It seems that the inaccuracy is accumulated.
If I change the font from "宋体" to others such as "DejaVuSans" and using Latin as context content, both pdf and doc files show well.

I upload the comparison screen print and jrxml file, see attachments.
Thanks.

v6.3
JasperReports
liuminming520's picture
Joined: Jan 1 2014 - 6:22am
Last seen: 3 years 3 weeks ago

2 Comments:

#1
  • Severity:Text» Major
#2

When exporting docx, I find follwing code in net.sf.jasperreports.engine.export.LengthUtil.java:
public static int twip(float points)
{
return (int)(points * 20);
}
I wonder why 20? If I use 22.5, the textbox size will fit the paragraph height in docx, But i don't know whether it is a anwser.

Feedback
randomness