#include <SFML/Graphics/Export.h>#include <SFML/Graphics/FontInfo.h>#include <SFML/Graphics/Glyph.h>#include <SFML/Graphics/Types.h>#include <SFML/System/InputStream.h>#include <stddef.h>Go to the source code of this file.
Functions | |
| CSFML_GRAPHICS_API sfFont * | sfFont_createFromFile (const char *filename) |
| Create a new font from a file. More... | |
| CSFML_GRAPHICS_API sfFont * | sfFont_createFromMemory (const void *data, size_t sizeInBytes) |
| Create a new image font a file in memory. More... | |
| CSFML_GRAPHICS_API sfFont * | sfFont_createFromStream (sfInputStream *stream) |
| Create a new image font a custom stream. More... | |
| CSFML_GRAPHICS_API sfFont * | sfFont_copy (const sfFont *font) |
| Copy an existing font. More... | |
| CSFML_GRAPHICS_API void | sfFont_destroy (sfFont *font) |
| Destroy an existing font. More... | |
| CSFML_GRAPHICS_API sfGlyph | sfFont_getGlyph (sfFont *font, sfUint32 codePoint, unsigned int characterSize, sfBool bold) |
| Get a glyph in a font. More... | |
| CSFML_GRAPHICS_API float | sfFont_getKerning (sfFont *font, sfUint32 first, sfUint32 second, unsigned int characterSize) |
| Get the kerning value corresponding to a given pair of characters in a font. More... | |
| CSFML_GRAPHICS_API float | sfFont_getLineSpacing (sfFont *font, unsigned int characterSize) |
| Get the line spacing value. More... | |
| CSFML_GRAPHICS_API float | sfFont_getUnderlinePosition (sfFont *font, unsigned int characterSize) |
| Get the position of the underline. More... | |
| CSFML_GRAPHICS_API float | sfFont_getUnderlineThickness (sfFont *font, unsigned int characterSize) |
| Get the thickness of the underline. More... | |
| CSFML_GRAPHICS_API const sfTexture * | sfFont_getTexture (sfFont *font, unsigned int characterSize) |
| Get the texture containing the glyphs of a given size in a font. More... | |
| CSFML_GRAPHICS_API sfFontInfo | sfFont_getInfo (const sfFont *font) |
| Get the font information. More... | |
| CSFML_GRAPHICS_API sfFont* sfFont_copy | ( | const sfFont * | font | ) |
Copy an existing font.
| font | Font to copy |
| CSFML_GRAPHICS_API sfFont* sfFont_createFromFile | ( | const char * | filename | ) |
Create a new font from a file.
| filename | Path of the font file to load |
| CSFML_GRAPHICS_API sfFont* sfFont_createFromMemory | ( | const void * | data, |
| size_t | sizeInBytes | ||
| ) |
Create a new image font a file in memory.
| data | Pointer to the file data in memory |
| sizeInBytes | Size of the data to load, in bytes |
| CSFML_GRAPHICS_API sfFont* sfFont_createFromStream | ( | sfInputStream * | stream | ) |
Create a new image font a custom stream.
| stream | Source stream to read from |
| CSFML_GRAPHICS_API void sfFont_destroy | ( | sfFont * | font | ) |
Destroy an existing font.
| font | Font to delete |
| CSFML_GRAPHICS_API sfGlyph sfFont_getGlyph | ( | sfFont * | font, |
| sfUint32 | codePoint, | ||
| unsigned int | characterSize, | ||
| sfBool | bold | ||
| ) |
Get a glyph in a font.
| font | Source font |
| codePoint | Unicode code point of the character to get |
| characterSize | Character size, in pixels |
| bold | Retrieve the bold version or the regular one? |
| CSFML_GRAPHICS_API sfFontInfo sfFont_getInfo | ( | const sfFont * | font | ) |
Get the font information.
The returned structure will remain valid only if the font is still valid. If the font is invalid an invalid structure is returned.
| font | Source font |
| CSFML_GRAPHICS_API float sfFont_getKerning | ( | sfFont * | font, |
| sfUint32 | first, | ||
| sfUint32 | second, | ||
| unsigned int | characterSize | ||
| ) |
Get the kerning value corresponding to a given pair of characters in a font.
| font | Source font |
| first | Unicode code point of the first character |
| second | Unicode code point of the second character |
| characterSize | Character size, in pixels |
| CSFML_GRAPHICS_API float sfFont_getLineSpacing | ( | sfFont * | font, |
| unsigned int | characterSize | ||
| ) |
Get the line spacing value.
| font | Source font |
| characterSize | Character size, in pixels |
| CSFML_GRAPHICS_API const sfTexture* sfFont_getTexture | ( | sfFont * | font, |
| unsigned int | characterSize | ||
| ) |
Get the texture containing the glyphs of a given size in a font.
| font | Source font |
| characterSize | Character size, in pixels |
| CSFML_GRAPHICS_API float sfFont_getUnderlinePosition | ( | sfFont * | font, |
| unsigned int | characterSize | ||
| ) |
Get the position of the underline.
Underline position is the vertical offset to apply between the baseline and the underline.
| font | Source font |
| characterSize | Reference character size |
| CSFML_GRAPHICS_API float sfFont_getUnderlineThickness | ( | sfFont * | font, |
| unsigned int | characterSize | ||
| ) |
Get the thickness of the underline.
Underline thickness is the vertical size of the underline.
| font | Source font |
| characterSize | Reference character size |