Removed the built-in default font

This commit is contained in:
Laurent Gomila 2012-08-03 23:50:34 +02:00
parent a3357d9c10
commit a0c1f5f50f
9 changed files with 53 additions and 14752 deletions

View file

@ -197,20 +197,6 @@ public :
////////////////////////////////////////////////////////////
Font& operator =(const Font& right);
////////////////////////////////////////////////////////////
/// \brief Return the default built-in font
///
/// This font is provided for convenience, it is used by
/// sf::Text instances by default. It is provided so that
/// users don't have to provide and load a font file in order
/// to display text on screen.
/// The font used is Arial.
///
/// \return Reference to the built-in default font
///
////////////////////////////////////////////////////////////
static const Font& getDefaultFont();
private :
////////////////////////////////////////////////////////////
@ -316,7 +302,7 @@ private :
/// the loadFromFile function for the complete list of supported formats.
///
/// Once it is loaded, a sf::Font instance provides three
/// types of informations about the font:
/// types of information about the font:
/// \li Global metrics, such as the line spacing
/// \li Per-glyph metrics, such as bounding box or kerning
/// \li Pixel representation of glyphs

View file

@ -70,14 +70,14 @@ public :
Text();
////////////////////////////////////////////////////////////
/// \brief Construct the string from a string, font and size
/// \brief Construct the text from a string, font and size
///
/// \param string Text assigned to the string
/// \param font Font used to draw the string
/// \param characterSize Base size of characters, in pixels
///
////////////////////////////////////////////////////////////
explicit Text(const String& string, const Font& font = Font::getDefaultFont(), unsigned int characterSize = 30);
explicit Text(const String& string, const Font& font, unsigned int characterSize = 30);
////////////////////////////////////////////////////////////
/// \brief Set the text's string
@ -109,8 +109,6 @@ public :
/// 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
/// Font::getDefaultFont().
///
/// \param font New font
///
@ -179,15 +177,16 @@ public :
////////////////////////////////////////////////////////////
/// \brief Get the text's font
///
/// If the text has no font attached, a NULL pointer is returned.
/// The returned reference is const, which means that you
/// cannot modify the font when you get it from this function.
///
/// \return Text's font
/// \return Pointer to the text's font
///
/// \see setFont
///
////////////////////////////////////////////////////////////
const Font& getFont() const;
const Font* getFont() const;
////////////////////////////////////////////////////////////
/// \brief Get the character size
@ -348,10 +347,6 @@ private :
/// window.draw(text);
/// \endcode
///
/// Note that you don't need to load a font to draw text,
/// SFML comes with a built-in font that is implicitely used
/// by default.
///
/// \see sf::Font, sf::Transformable
///
////////////////////////////////////////////////////////////