pygame.font.Font 
 create a new Font object from a file Font(filename, size) -> Font Font(object, size) -> Font  Load a new font from a given filename or a python file object. The size is the height of the font in pixels. If the filename is None the pygame default font will be loaded. If a font cannot be loaded from the arguments given an exception will be raised. Once the font is created the size cannot be changed. Font objects are mainly used to render text into new Surface objects. The render can emulate bold or italic features, but it is better to load from a font with actual italic or bold glyphs. The rendered text can be regular strings or unicode.   bold 
 Gets or sets whether the font should be rendered in (faked) bold. bold -> bool  Whether the font should be rendered in bold. When set to True, this enables the bold rendering of text. This is a fake stretching of the font that doesn't look good on many font types. If possible load the font from a real bold font file. While bold, the font will have a different width than when normal. This can be mixed with the italic and underline modes.  New in pygame 2.0.0.  
   italic 
 Gets or sets whether the font should be rendered in (faked) italics. italic -> bool  Whether the font should be rendered in italic. When set to True, this enables fake rendering of italic text. This is a fake skewing of the font that doesn't look good on many font types. If possible load the font from a real italic font file. While italic the font will have a different width than when normal. This can be mixed with the bold and underline modes.  New in pygame 2.0.0.  
   underline 
 Gets or sets whether the font should be rendered with an underline. underline -> bool  Whether the font should be rendered in underline. When set to True, all rendered fonts will include an underline. The underline is always one pixel thick, regardless of font size. This can be mixed with the bold and italic modes.  New in pygame 2.0.0.  
   render() 
 draw text on a new Surface render(text, antialias, color, background=None) -> Surface  This creates a new Surface with the specified text rendered on it. pygame provides no way to directly draw text on an existing Surface: instead you must use Font.render() to create an image (Surface) of the text, then blit this image onto another Surface. The text can only be a single line: newline characters are not rendered. Null characters ('x00') raise a TypeError. Both Unicode and char (byte) strings are accepted. For Unicode strings only UCS-2 characters ('u0001' to 'uFFFF') are recognized. Anything greater raises a UnicodeError. For char strings a LATIN1 encoding is assumed. The antialias argument is a boolean: if true the characters will have smooth edges. The color argument is the color of the text [e.g.: (0,0,255) for blue]. The optional background argument is a color to use for the text background. If no background is passed the area outside the text will be transparent. The Surface returned will be of the dimensions required to hold the text. (the same as those returned by Font.size()). If an empty string is passed for the text, a blank surface will be returned that is zero pixel wide and the height of the font. Depending on the type of background and antialiasing used, this returns different types of Surfaces. For performance reasons, it is good to know what type of image will be used. If antialiasing is not used, the return image will always be an 8-bit image with a two-color palette. If the background is transparent a colorkey will be set. Antialiased images are rendered to 24-bit RGB images. If the background is transparent a pixel alpha will be included. Optimization: if you know that the final destination for the text (on the screen) will always have a solid background, and the text is antialiased, you can improve performance by specifying the background color. This will cause the resulting image to maintain transparency information by colorkey rather than (much less efficient) alpha values. If you render '\n' an unknown char will be rendered. Usually a rectangle. Instead you need to handle new lines yourself. Font rendering is not thread safe: only a single thread can render text at any time. 
   size() 
 determine the amount of space needed to render text size(text) -> (width, height)  Returns the dimensions needed to render the text. This can be used to help determine the positioning needed for text before it is rendered. It can also be used for wordwrapping and other layout effects. Be aware that most fonts use kerning which adjusts the widths for specific letter pairs. For example, the width for "ae" will not always match the width for "a" + "e". 
   set_underline() 
 control if text is rendered with an underline set_underline(bool) -> None  When enabled, all rendered fonts will include an underline. The underline is always one pixel thick, regardless of font size. This can be mixed with the bold and italic modes.  Note This is the same as the underline attribute.  
   get_underline() 
 check if text will be rendered with an underline get_underline() -> bool  Return True when the font underline is enabled.  
 Note This is the same as the underline attribute.  
 
   set_bold() 
 enable fake rendering of bold text set_bold(bool) -> None  Enables the bold rendering of text. This is a fake stretching of the font that doesn't look good on many font types. If possible load the font from a real bold font file. While bold, the font will have a different width than when normal. This can be mixed with the italic and underline modes.  Note This is the same as the bold attribute.  
   get_bold() 
 check if text will be rendered bold get_bold() -> bool  Return True when the font bold rendering mode is enabled.  Note This is the same as the bold attribute.  
   set_italic() 
 enable fake rendering of italic text set_italic(bool) -> None  Enables fake rendering of italic text. This is a fake skewing of the font that doesn't look good on many font types. If possible load the font from a real italic font file. While italic the font will have a different width than when normal. This can be mixed with the bold and underline modes.  Note This is the same as the italic attribute.  
   metrics() 
 gets the metrics for each character in the passed string metrics(text) -> list  The list contains tuples for each character, which contain the minimum X offset, the maximum X offset, the minimum Y offset, the maximum Y offset and the advance offset (bearing plus width) of the character. [(minx, maxx, miny, maxy, advance), (minx, maxx, miny, maxy, advance), ...]. None is entered in the list for each unrecognized character. 
   get_italic() 
 check if the text will be rendered italic get_italic() -> bool  Return True when the font italic rendering mode is enabled.  Note This is the same as the italic attribute.  
   get_linesize() 
 get the line space of the font text get_linesize() -> int  Return the height in pixels for a line of text with the font. When rendering multiple lines of text this is the recommended amount of space between lines. 
   get_height() 
 get the height of the font get_height() -> int  Return the height in pixels of the actual rendered text. This is the average size for each glyph in the font. 
   get_ascent() 
 get the ascent of the font get_ascent() -> int  Return the height in pixels for the font ascent. The ascent is the number of pixels from the font baseline to the top of the font. 
   get_descent() 
 get the descent of the font get_descent() -> int  Return the height in pixels for the font descent. The descent is the number of pixels from the font baseline to the bottom of the font.