pygame2.sdlttf.constants – Constants for SDL_ttf
This module contains the constants used throughout the pygame2.sdlttf
modules.
Style Constants
Those constants denote the font style and can be used as bit-wise OR’d
combinations.
-
pygame2.sdlttf.constants.STYLE_NORMAL
- The default font style.
-
pygame2.sdlttf.constants.STYLE_BOLD
- Indicates a bold font style.
-
pygame2.sdlttf.constants.STYLE_ITALIC
- Indicates an italic font style.
-
pygame2.sdlttf.constants.STYLE_UNDERLINE
- Indicates an underlined font style.
Render Constants
The following constants are used for rendering text for a certain font using
pygam2.sdlttf.Font.render().
-
pygame2.sdlttf.constants.RENDER_SOLID
- Creates an 8-bit palettized surface and renders the given text at fast
quality with the given color. The 0 pixel is the colorkey, giving a
transparent background, and the 1 pixel is set to the text color.
-
pygame2.sdlttf.constants.RENDER_SHADED
- Creates an 8-bit palettized surface and renders the given text at high
quality with the given colors. The 0 pixel is background, other pixels have
varying degrees of the foreground color.
-
pygame2.sdlttf.constants.RENDER_BLENDED
- Creates a 32-bit ARGB surface and renders the given text at high quality,
alpha blending to dither the font with the given color.