i think no...well, at least, with 2 lines i get a precise height. And with many 
lines the space is too much, like 42 lines and 200 px more.. So it shouldn't be 
this..

line height is actually just the line height plus the line leading (the space 
between lines) , no?
Would it have more things involved?

thanks,
Carlos


--- In [email protected], Alex Harui <aha...@...> wrote:
>
> Flash has a 2 pixel gutter all around the text.  Is that throwing off your 
> calculations?
> 
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.<http://www.adobe.com/>
> Blog: http://blogs.adobe.com/aharui
> 
> From: [email protected] [mailto:[email protected]] On 
> Behalf Of carloscarvalhar
> Sent: Friday, March 27, 2009 10:49 AM
> To: [email protected]
> Subject: [flexcoders] mx:Text and line height
> 
> 
> Hi,
> 
> how can i get a correct line heigth of mx:Text?
> 
> This is code that i'm using:
> public function get textLineHeight():uint {
> var textLineMetrics:TextLineMetrics = this.getLineMetrics(0);
> _textLineHeight = textLineMetrics.height + textLineMetrics.leading;
> return _textLineHeight;
> }
> 
> And the result is strange...if i have only one line, i need to add 3 pixels, 
> if i have two lines, it's ok. But if i have more than 2 lines the height 
> returned is bigger than it should be...
> 
> what am i doing wrong? how should i get a REAL line height?
> 
> Thanks,
> Carlos
> PS: you can see it happening here:
> http://carvalhar.com/#/blog/45/incorporando-fontes-no-flex/
>


Reply via email to