no parameters
Returns: int
Parameters: char const * filename, float size
Returns: LandFont*
Load the given font file, with the given size. The size usually is the pixel height of a line in the font. But some fonts, e.g. bitmap fonts, will ignore it. The font also us made the current font if successfully loaded.
Parameters: LandFont * self
Parameters: LandFont * f, double scaling
Parameters: float x, float y
Parameters: float w
Returns: float
Parameters: float wrap_width
Parameters: char const * s, int newline, int alignment
Parameters: PrintFunc print_override
Parameters: char const * str
Parameters: char const * str, int nth
Parameters: char const * str, int x
Parameters: char const * text, …
Parameters: char const * text, va_list args
Parameters: char const * text, int w, int h, int alignment
Print text inside, and starts a new line whenever the text goes over the given width, wrapping at whitespace. If a single word is bigger than w, it will be printed in its own line and exceed w. If h is 0, the whole text is printed. Otherwise, only as many lines as fit into h pixels are printed. The return value is the offset into text in bytes of one past the last printed character.
Parameters: int w, int h, char const * text, …
Parameters: int w, int h, char const * str
Returns: LandArray*
Splits the given string into multiple lines no longer than w pixels. The returned array will have a newly allocated string for each line. You are responsible for freeing those strings again. The calculations will use the current font. Note that for large texts, this can take a while, so you should do calculations on demand and only for the visible text. You can call land_wordwrap_extents after this functions to get the dimensions of a box which will be able to hold all the text.
Parameters: LandArray * lines
Splits the text into lines, and updates the wordwrap extents.
Parameters: float * w, float * h
Parameters: LandArray * lines, int alignment, LandHash * colors
Given an array of lines, print the visible ones.
Parameters: LandHash * colors, int i, str col
Parameters: LandArray * lines, int alignment
Parameters: LandImage * image, int n_ranges, int * ranges