Removed the default font

This commit is contained in:
Laurent Gomila committed 2012-08-03 23:53:48 +02:00
1 parent 0757c89d7c
commit d7240abb18
4 files changed
+5 -22

No files matched your search

-8
View File
@@ -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);
////////////////////////////////////////////////////////////
/// \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
+4 -2
View File
@@ -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.
/// If the font is destroyed and the text tries to
/// use it, the behaviour is undefined.
/// Texts have a valid font by default, which the built-in
/// sfFont_getDefaultFont().
///
/// \param text Text object
/// \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
///
/// 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
///
/// \return Pointer to the font
-11
View File
@@ -155,14 +155,3 @@ const sfTexture* sfFont_getTexture(sfFont* font, unsigned int 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;
}
+1 -1
View File
@@ -37,7 +37,7 @@
sfText* sfText_create(void)
{
sfText* text = new sfText;
text->Font = sfFont_getDefaultFont();
text->Font = NULL;
return text;
}