diff --git a/include/SFML/Graphics/Font.h b/include/SFML/Graphics/Font.h index d7c0930..31e37ae 100644 --- a/include/SFML/Graphics/Font.h +++ b/include/SFML/Graphics/Font.h @@ -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 diff --git a/include/SFML/Graphics/Text.h b/include/SFML/Graphics/Text.h index 74d8183..596ce91 100644 --- a/include/SFML/Graphics/Text.h +++ b/include/SFML/Graphics/Text.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. /// 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 diff --git a/src/SFML/Graphics/Font.cpp b/src/SFML/Graphics/Font.cpp index a1403de..b845f61 100644 --- a/src/SFML/Graphics/Font.cpp +++ b/src/SFML/Graphics/Font.cpp @@ -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()}; - - return &defaultFont; -} diff --git a/src/SFML/Graphics/Text.cpp b/src/SFML/Graphics/Text.cpp index 63554ee..1deb219 100644 --- a/src/SFML/Graphics/Text.cpp +++ b/src/SFML/Graphics/Text.cpp @@ -37,7 +37,7 @@ sfText* sfText_create(void) { sfText* text = new sfText; - text->Font = sfFont_getDefaultFont(); + text->Font = NULL; return text; }