mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-26 13:06:13 +01:00
Added missing get underline thickness and position functions
This commit is contained in:
1 parent
6667deca6f
commit
62188c38ec
2 files changed
+41
No files matched your search
@@ -121,6 +121,33 @@ CSFML_GRAPHICS_API float sfFont_getKerning(sfFont* font, sfUint32 first, sfUint3
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API float sfFont_getLineSpacing(sfFont* font, unsigned int characterSize);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the position of the underline
|
||||
///
|
||||
/// Underline position is the vertical offset to apply between the
|
||||
/// baseline and the underline.
|
||||
///
|
||||
/// \param font Source font
|
||||
/// \param characterSize Reference character size
|
||||
///
|
||||
/// \return Underline position, in pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API float sfFont_getUnderlinePosition(sfFont* font, unsigned int characterSize);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the thickness of the underline
|
||||
///
|
||||
/// Underline thickness is the vertical size of the underline.
|
||||
///
|
||||
/// \param font Source font
|
||||
/// \param characterSize Reference character size
|
||||
///
|
||||
/// \return Underline thickness, in pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API float sfFont_getUnderlineThickness(sfFont* font, unsigned int characterSize);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the texture containing the glyphs of a given size in a font
|
||||
///
|
||||
|
||||
@@ -128,6 +128,20 @@ float sfFont_getLineSpacing(sfFont* font, unsigned int characterSize)
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
float sfFont_getUnderlinePosition(sfFont* font, unsigned int characterSize)
|
||||
{
|
||||
CSFML_CALL_RETURN(font, getUnderlinePosition(characterSize), 0)
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
float sfFont_getUnderlineThickness(sfFont* font, unsigned int characterSize)
|
||||
{
|
||||
CSFML_CALL_RETURN(font, getUnderlineThickness(characterSize), 0)
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
const sfTexture* sfFont_getTexture(sfFont* font, unsigned int characterSize)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user