The font must be a TrueType font (TTF) file which has been
loaded or mapped into memory. Following some basic
validation, the relevant sections of the font file contents
are copied, and it is safe to change or destroy after this
call. As an optimization, calling this with either a null
pointer or zero for the number of bytes will allow for
changing the size of the previous font without recopying from
the file. Note that the font parsing is not meant to be
secure; only use this with trusted TTF files!
Set the font to use for text drawing.
The font must be a TrueType font (TTF) file which has been loaded or mapped into memory. Following some basic validation, the relevant sections of the font file contents are copied, and it is safe to change or destroy after this call. As an optimization, calling this with either a null pointer or zero for the number of bytes will allow for changing the size of the previous font without recopying from the file. Note that the font parsing is not meant to be secure; only use this with trusted TTF files!