I guess there's a slight mistake in how GetTextHeight calculates number of lines needed for a text.
For example, if you write this:
Quote
int width = GetTextWidth(Text, Font);
int height = GetTextHeight(Text, Font, width); // here we use actual width of text as a width limit
- in this case value calculated will be equal to height of 2 lines, while there obviously should be 1 line.
If you make width limit 1 pixel larger it gives correct result:
Quote
int height = GetTextHeight(Text, Font, width + 1);
Also, I suggest to implement another function (unless it is already implemented and I am just not aware of it) that returns simply Font Height, that is if you wish to know a height of single line of text.