Font handling class.
This class stores a font for use by sge.Sprite.draw_text and sge.Room.render_text.
Note that bold and italic rendering could be ugly. It is better to choose a bold or italic font rather than enabling bold or italic rendering, if possible.
Attributes:
Read-Only Attributes:
Create a new Font object.
Arguments:
name – The name of the font. Can be one of the following:
If none of the above methods return a valid font, SGE will choose the font.
id – The unique identifier of the font. If set to None, name will be used, modified by SGE if it is already the unique identifier of another font.
All other arguments set the respective initial attributes of the font. See the documentation for Font for more information.
Note that it is generally not a good practice to rely on system fonts. A font which you have on your system is probably not on everyone’s system. For example, most Windows systems have a font called Times New Roman, but this font is rarely found on GNU/Linux systems. On the other hand, most GNU/Linux systems have the Liberation fonts included by default, but these fonts are uncommon on Windows systems. Rather than relying on system fonts, choose a font which is under a free license (such as the GNU General Public License or the SIL Open Font License) and distribute it with your game; this will ensure that everyone sees text rendered the same way you do.
Return the size of a certain string of text when rendered.
See the documentation for sge.Sprite.draw_text for information about the arguments.