SFML community forums

Help => Graphics => Topic started by: Mina66 on April 18, 2013, 10:07:54 am

Title: Font size
Post by: Mina66 on April 18, 2013, 10:07:54 am
How to know the size of the X?

(http://s2.ipicture.ru/uploads/20130418/M12jkRMx.png)
Title: Re: Font size
Post by: Laurent on April 18, 2013, 11:20:46 am
Not sure. You must play with font.getGlyph('g').bounds, but I don't know the exact formula and I haven't got time to figure it now. The glyph's bounding rect is relative to the base line, and the total height of a line is font.getLineHeight().
Title: Re: Font size
Post by: Mina66 on April 18, 2013, 03:03:41 pm
and the total height of a line is font.getLineHeight().

I can not find this method
getLineHeight()

I SFML 2.0
Title: Re: Font size
Post by: Laurent on April 18, 2013, 03:10:54 pm
Sorry. It's getLineSpacing.