mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-26 21:16:13 +01:00
Changed the font metrics to return floats instead of ints
This commit is contained in:
1 parent
42c2fb1f5c
commit
1f8b022d17
3 files changed
+7
-7
No files matched your search
@@ -108,7 +108,7 @@ CSFML_GRAPHICS_API sfGlyph sfFont_getGlyph(sfFont* font, sfUint32 codePoint, uns
|
||||
/// \return Kerning offset, in pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API int sfFont_getKerning(sfFont* font, sfUint32 first, sfUint32 second, unsigned int characterSize);
|
||||
CSFML_GRAPHICS_API float sfFont_getKerning(sfFont* font, sfUint32 first, sfUint32 second, unsigned int characterSize);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the line spacing value
|
||||
@@ -119,7 +119,7 @@ CSFML_GRAPHICS_API int sfFont_getKerning(sfFont* font, sfUint32 first, sfUint32
|
||||
/// \return Line spacing, in pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API int sfFont_getLineSpacing(sfFont* font, unsigned int characterSize);
|
||||
CSFML_GRAPHICS_API float sfFont_getLineSpacing(sfFont* font, unsigned int characterSize);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the texture containing the glyphs of a given size in a font
|
||||
|
||||
@@ -37,9 +37,9 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
typedef struct
|
||||
{
|
||||
int advance; ///< Offset to move horizontically to the next character
|
||||
sfIntRect bounds; ///< Bounding rectangle of the glyph, in coordinates relative to the baseline
|
||||
sfIntRect textureRect; ///< Texture coordinates of the glyph inside the font's image
|
||||
float advance; ///< Offset to move horizontically to the next character
|
||||
sfFloatRect bounds; ///< Bounding rectangle of the glyph, in coordinates relative to the baseline
|
||||
sfIntRect textureRect; ///< Texture coordinates of the glyph inside the font's image
|
||||
} sfGlyph;
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user