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/