Expand description
Playdate text API
Modules§
Structs§
- Font
- Playdate Font representation.
- Font
Page - Playdate FontPage representation.
- Glyph
- Playdate Glyph representation.
Enums§
Traits§
Functions§
- draw_
text - Draws the given
textusing the provided coordsx,y. - draw_
text_ cstr - Draws the given
textusing the provided options. - draw_
text_ in_ rect - Draws the
textin the given rectangle using the provided options. - get_
font_ height - Returns the height of the given
font. - get_
font_ page - Returns an
FontPageobject for the given character codec. - get_
glyph_ kerning - Returns the kerning adjustment between characters
glyph_codeandnext_codeas specified by the font - get_
page_ glyph - Returns an
Glyphobject for charactercinFontPagepage, - get_
page_ glyph_ with_ bitmap - Returns an
Glyphobject for charactercinFontPagepage, and optionally returns the glyph’s bitmap andadvancevalue. - get_
text_ tracking - Gets the tracking used when drawing text.
- get_
text_ width - Returns the width of the given
textin the givenfont. - get_
text_ width_ cstr - Returns the width of the given
textin the givenfont. - load_
font - Returns the
Fontobject for the font file atpath. - make_
font_ from_ bytes - ⚠️ Caution: This function is not tested.
- set_
font - Sets the
fontto use in subsequentdraw_textcalls. - set_
text_ leading - Sets the leading adjustment (added to the leading specified in the font) to use when drawing text.
- set_
text_ tracking - Sets the tracking to use when drawing text.