You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2009/07/28 14:27:38 UTC
DO NOT REPLY [Bug 47594] New: TextShape.resizeToFitText() height too
small
https://issues.apache.org/bugzilla/show_bug.cgi?id=47594
Summary: TextShape.resizeToFitText() height too small
Product: POI
Version: unspecified
Platform: PC
OS/Version: Windows Server 2008 (Longhorn)
Status: NEW
Severity: normal
Priority: P2
Component: HSLF
AssignedTo: dev@poi.apache.org
ReportedBy: f_bullitt@yahoo.de
The method TextShape.resizeToFitText() calculates a height that is too small
for the TextShape if the text contains many lines.
I tried poi-versions from 3.1 to 3.5 and java-versions from 1.4 to 1.6
Sample Code:
SlideShow ppt = new SlideShow();
Slide slide = ppt.createSlide();
TextBox txtBox = new TextBox();
slide.addShape(txtBox);
txtBox.setLineColor(Color.BLACK);
txtBox.setText("Line One\nLine Two\nThree\nFour\nFive\nSix\nSeven\Eight");
txtBox.resizeToFitText();
FileOutputStream out = new FileOutputStream("test.ppt");
ppt.write(out);
out.close();
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 47594] TextShape.resizeToFitText() height too
small
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47594
Nick Burch <ni...@torchbox.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #1 from Nick Burch <ni...@torchbox.com> 2009-07-28 05:54:50 PST ---
There's code in TextShape.resizeToFitText() that appears to handle the height
stuff in a way I'd expect to work.
Could it be a font issue? Can you confirm that the font that your text is using
really is present (and available to java!) on the machine where you're running
your poi code? Also, if you try changing the font, does the height mismatch
change, or is at say always out by ~10%?
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 47594] TextShape.resizeToFitText() height too
small
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47594
--- Comment #3 from f_bullitt@yahoo.de 2009-07-28 06:54:36 PST ---
By the way, in the RichTextRun I set setBold(true).
I tried the Windows-Font arialbd.ttf and now the calculation of height works
correctly!
Maybe the normal arial.ttf does not really work with bold.
So I don't know if this is still a bug.
Thank you.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 47594] TextShape.resizeToFitText() height too
small
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47594
f_bullitt@yahoo.de changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW
--- Comment #2 from f_bullitt@yahoo.de 2009-07-28 06:35:29 PST ---
The font I use is arial.ttf and it is present and available to Java.
But as you said, I tested two other fonts (times.ttf and kartika.ttf) and with
these two fonts, the height seems to be calculated correctly.
Unfortunately I have to use arial in the PPT.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org