Behavior of StiText and CanGrow

Stimulsoft Reports.WPF discussion
Post Reply
LukasT
Posts: 306
Joined: Mon May 03, 2010 2:50 am
Location: Czech Republic

Behavior of StiText and CanGrow

Post by LukasT »

Hello,
if I have StiText object with specific height and CanGrow property is true, rendered text has not the same height even if it is not important to increase height value (text is not wrapped etc.). Is this bug or normal behavior?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Behavior of StiText and CanGrow

Post by HighAley »

Hello.
LukasT wrote:Hello,
if I have StiText object with specific height and CanGrow property is true, rendered text has not the same height even if it is not important to increase height value (text is not wrapped etc.). Is this bug or normal behavior?
Please, describe your issue more detailed. Send us screen-shot of the issue or better a report template with data.

Thank you.
LukasT
Posts: 306
Joined: Mon May 03, 2010 2:50 am
Location: Czech Republic

Behavior of StiText and CanGrow

Post by LukasT »

Hello,
see attached example... Two StiTexts with same size... Even if second one has true value of CanGrow parameter, I am not expecting growing height when the text is rendered correctly....
Attachments
1836.Report.mrt
(4.35 KiB) Downloaded 289 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Behavior of StiText and CanGrow

Post by HighAley »

Hello.
LukasT wrote:see attached example... Two StiTexts with same size... Even if second one has true value of CanGrow parameter, I am not expecting growing height when the text is rendered correctly....
The height of the text box is calculated not by the text in it but by the font parameters (ascent, descent, linegap).
So the height is set so that all symbols fit in this text box. For example, the "y" symbol needs more space from below.
Also the .Net Framework add some pixels to compensate for different rounding errors.

You could read about it more in the next article:
http://www.microsoft.com/typography/otspec/TTCH01.htm
FUnits and the em square
In a TrueType font file point locations are described in font units, or FUnits. An FUnit is the smallest measurable unit in the em square, an imaginary square that is used to size and align glyphs. The dimensions of the em square typically are those of the full body height of a font plus some extra spacing to prevent lines of text from colliding when typeset without extra leading.
Thank you.
LukasT
Posts: 306
Joined: Mon May 03, 2010 2:50 am
Location: Czech Republic

Behavior of StiText and CanGrow

Post by LukasT »

I understand.... thank you for the answer ;-)
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

Behavior of StiText and CanGrow

Post by Andrew »

Great!

Let us know if you have additional questions.
Thank you.
Post Reply