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?
Behavior of StiText and CanGrow
Behavior of StiText and CanGrow
Hello.
Thank you.
Please, describe your issue more detailed. Send us screen-shot of the issue or better a report template with data.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?
Thank you.
Behavior of StiText and CanGrow
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....
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
Behavior of StiText and CanGrow
Hello.
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
The height of the text box is calculated not by the text in it but by the font parameters (ascent, descent, linegap).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....
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
Thank you.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.
Behavior of StiText and CanGrow
I understand.... thank you for the answer 

Behavior of StiText and CanGrow
Great!
Let us know if you have additional questions.
Thank you.
Let us know if you have additional questions.
Thank you.