Fix bitmap font resize failing silently when resizing to an unsupported pixel size (#448), fixed getKerning returning scaled values even for bitmap fonts.
This commit is contained in:
parent
0124ad0a85
commit
da79517b36
3 changed files with 47 additions and 2 deletions
|
@ -152,6 +152,10 @@ public :
|
|||
////////////////////////////////////////////////////////////
|
||||
/// \brief Retrieve a glyph of the font
|
||||
///
|
||||
/// If the font is a bitmap font, not all character sizes
|
||||
/// might be available. If the glyph is not available at the
|
||||
/// requested size, an empty glyph is returned.
|
||||
///
|
||||
/// \param codePoint Unicode code point of the character to get
|
||||
/// \param characterSize Reference character size
|
||||
/// \param bold Retrieve the bold version or the regular one?
|
||||
|
@ -379,6 +383,12 @@ private :
|
|||
/// with this class. However, it may be useful to access the
|
||||
/// font metrics or rasterized glyphs for advanced usage.
|
||||
///
|
||||
/// Note that if the font is a bitmap font, it is not scalable,
|
||||
/// thus not all requested sizes will be available to use. This
|
||||
/// needs to be taken into consideration when using sf::Text.
|
||||
/// If you need to display text of a certain size, make sure the
|
||||
/// corresponding bitmap font that supports that size is used.
|
||||
///
|
||||
/// \see sf::Text
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -72,6 +72,13 @@ public :
|
|||
////////////////////////////////////////////////////////////
|
||||
/// \brief Construct the text from a string, font and size
|
||||
///
|
||||
/// Note that if the used font is a bitmap font, it is not
|
||||
/// scalable, thus not all requested sizes will be available
|
||||
/// to use. This needs to be taken into consideration when
|
||||
/// setting the character size. If you need to display text
|
||||
/// of a certain size, make sure the corresponding bitmap
|
||||
/// font that supports that size is used.
|
||||
///
|
||||
/// \param string Text assigned to the string
|
||||
/// \param font Font used to draw the string
|
||||
/// \param characterSize Base size of characters, in pixels
|
||||
|
@ -122,6 +129,13 @@ public :
|
|||
///
|
||||
/// The default size is 30.
|
||||
///
|
||||
/// Note that if the used font is a bitmap font, it is not
|
||||
/// scalable, thus not all requested sizes will be available
|
||||
/// to use. This needs to be taken into consideration when
|
||||
/// setting the character size. If you need to display text
|
||||
/// of a certain size, make sure the corresponding bitmap
|
||||
/// font that supports that size is used.
|
||||
///
|
||||
/// \param size New character size, in pixels
|
||||
///
|
||||
/// \see getCharacterSize
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue