Expand description
Functions to load fonts and draw text.
Structs§
- Font
- TTF font loaded to GPU
- Text
Dimensions - World space dimensions of the text, measured by “measure_text” function
- Text
Params - Arguments for “draw_text_ex” function such as font, font_size etc
Functions§
- camera_
font_ scale - From given font size in world space gives (font_size, font_scale and font_aspect) params to make rasterized font looks good in currently active camera
- draw_
multiline_ text - Draw multiline text with the given font_size, line_distance_factor and color. If no line distance but a custom font is given, the fonts line gap will be used as line distance factor if it exists.
- draw_
multiline_ text_ ex - Draw multiline text with the given line distance and custom params such as font, font size and font scale. If no line distance but a custom font is given, the fonts newline size will be used as line distance factor if it exists, else default to font size.
- draw_
text - Draw text with given font_size Returns text size
- draw_
text_ ex - Draw text with custom params such as font, font size and font scale Returns text size
- get_
default_ font - Returns macroquads default font.
- get_
text_ center - Get the text center.
- load_
ttf_ font - Load font from file with “path”
- load_
ttf_ font_ from_ bytes - Load font from bytes array, may be use in combination with include_bytes!
- measure_
multiline_ text - measure_
text - set_
default_ font - Replaces macroquads default font with
font. - wrap_
text - Converts word breaks to newlines wherever the text would otherwise exceed the given length.