End of the tutorial
http://sfml-dev.org/tutorials/2.1/graphics-text.php:
The sf::Glyph structure contains three members:
- textureRect is the texture coordinates of the glyph within the texture
- bounds is the bounding rectangle of the glyph, which helps to position it relatively to the base line of the text
- advance is the horizontal offset to apply to get the start position of the next glyph in the text
Above it absolutely clear on first read, like everything in the tutorial/docs, except one thing:
Finally, you can get some other metrics of the font, such as the line spacing or the kerning (always for a certain character size):
Below you see 2 function calls, but no hint of the use. It may as well not be there, but it would be nicer to improve it a bit:
I saw in the class list its 2 things measured in points, but not in tutorial?
I know kerning is a reduction in the spacing depending on two neighboring letters to make it look uniformly on differently sized/shaped letters, but normal people dont and would be happy about telling just that little bit (and its weird the tutorial got no info when the method list got some). Still I can only guess how the number of SFML applies. So is it a positive number you need to subtract or already a negative number you can directly add? The words in () let me guess its after adding the advance from above even though it probably just tells about needing to put the correct height as a parameter, but on a tutorial you shouldnt need to guess and even in the method list its ambiguous.
Btw., is line spacing the difference between the upper border of two lines of text or the difference between the lower border of one line and upper border of next line?