Text - Pyglet/Glyph based

arcade.Text

class arcade.Text(text: str, start_x: float, start_y: float, color: Union[Tuple[int, int, int], List[int], Tuple[int, int, int, int]] = (255, 255, 255), font_size: float = 12, width: int = 0, align: str = 'left', font_name: Union[str, Tuple[str, ...]] = ('calibri', 'arial'), bold: bool = False, italic: bool = False, anchor_x: str = 'left', anchor_y: str = 'baseline', multiline: bool = False, rotation: float = 0)[source]

arcade.attempt_font_name_resolution

arcade.create_text

arcade.create_text(*args, **kwargs)[source]

arcade.draw_text

arcade.draw_text(text: str, start_x: float, start_y: float, color: Union[Tuple[int, int, int], List[int], Tuple[int, int, int, int]] = (255, 255, 255), font_size: float = 12, width: int = 0, align: str = 'left', font_name: Union[str, Tuple[str, ...]] = ('calibri', 'arial'), bold: bool = False, italic: bool = False, anchor_x: str = 'left', anchor_y: str = 'baseline', multiline: bool = False, rotation: float = 0)[source]

Draws text to the screen using Pyglet’s label instead.

Parameters
  • text (str) – Text to draw

  • start_x (float) –

  • start_y (float) –

  • color (Color) – Color of the text

  • font_size (float) – Size of the text

  • width (float) –

  • align (str) –

  • font_name (Union[str, Tuple[str, ...]]) –

  • bold (bool) –

  • italic (bool) –

  • anchor_x (str) –

  • anchor_y (str) –

  • multiline (bool) –

  • wrap_lines (bool) –

  • rotation (float) –

arcade.load_font

arcade.load_font(font_name)[source]

Load a font for later use