mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-27 13:36:12 +01:00
Removed the default font
This commit is contained in:
1 parent
0757c89d7c
commit
d7240abb18
4 files changed
+5
-22
No files matched your search
@@ -133,13 +133,5 @@ CSFML_GRAPHICS_API int sfFont_getLineSpacing(sfFont* font, unsigned int characte
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
CSFML_GRAPHICS_API const sfTexture* sfFont_getTexture(sfFont* font, unsigned int characterSize);
|
CSFML_GRAPHICS_API const sfTexture* sfFont_getTexture(sfFont* font, unsigned int characterSize);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
|
||||||
/// \brief Get the built-in default font (Arial)
|
|
||||||
///
|
|
||||||
/// \return Pointer to the default font
|
|
||||||
///
|
|
||||||
////////////////////////////////////////////////////////////
|
|
||||||
CSFML_GRAPHICS_API const sfFont* sfFont_getDefaultFont(void);
|
|
||||||
|
|
||||||
|
|
||||||
#endif // SFML_IMAGE_H
|
#endif // SFML_IMAGE_H
|
||||||
@@ -257,8 +257,6 @@ CSFML_GRAPHICS_API void sfText_setUnicodeString(sfText* text, const sfUint32* st
|
|||||||
/// a pointer to the one that you passed to this function.
|
/// a pointer to the one that you passed to this function.
|
||||||
/// If the font is destroyed and the text tries to
|
/// If the font is destroyed and the text tries to
|
||||||
/// use it, the behaviour is undefined.
|
/// use it, the behaviour is undefined.
|
||||||
/// Texts have a valid font by default, which the built-in
|
|
||||||
/// sfFont_getDefaultFont().
|
|
||||||
///
|
///
|
||||||
/// \param text Text object
|
/// \param text Text object
|
||||||
/// \param font New font
|
/// \param font New font
|
||||||
@@ -324,6 +322,10 @@ CSFML_GRAPHICS_API const sfUint32* sfText_getUnicodeString(const sfText* text);
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Get the font used by a text
|
/// \brief Get the font used by a text
|
||||||
///
|
///
|
||||||
|
/// If the text has no font attached, a NULL pointer is returned.
|
||||||
|
/// The returned pointer is const, which means that you can't
|
||||||
|
/// modify the font when you retrieve it with this function.
|
||||||
|
///
|
||||||
/// \param text Text object
|
/// \param text Text object
|
||||||
///
|
///
|
||||||
/// \return Pointer to the font
|
/// \return Pointer to the font
|
||||||
|
|||||||
@@ -155,14 +155,3 @@ const sfTexture* sfFont_getTexture(sfFont* font, unsigned int characterSize)
|
|||||||
|
|
||||||
return &font->Textures[characterSize];
|
return &font->Textures[characterSize];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
|
||||||
/// Get the built-in default font (Arial)
|
|
||||||
////////////////////////////////////////////////////////////
|
|
||||||
const sfFont* sfFont_getDefaultFont(void)
|
|
||||||
{
|
|
||||||
static sfFont defaultFont = {sf::Font::getDefaultFont(), std::map<unsigned int, sfTexture>()};
|
|
||||||
|
|
||||||
return &defaultFont;
|
|
||||||
}
|
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
sfText* sfText_create(void)
|
sfText* sfText_create(void)
|
||||||
{
|
{
|
||||||
sfText* text = new sfText;
|
sfText* text = new sfText;
|
||||||
text->Font = sfFont_getDefaultFont();
|
text->Font = NULL;
|
||||||
|
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user