Font, text, police... Rooooxaaannne !
Quelques évolutions dans la gestion des polices, du fait de changement de librairie graphique.
Qui permet d'être plus souple et efficace, mais m'a conduit à renommer plusieurs fonctions pour plus de clarté.
Font, Text
C'est pourtant un grand classique, il y a les font pour ce qui concerne la police de caractères, et il y a text pour ce que l'on écrit.
On pourrait s'arrêter là...
Du coup il faut prendre du recul, et utiliser le bon vocabulaire, et nommer les fonctions en conséquence.
Alors:
font_sizepermet de changer la tailleload_fontpour charger la police (au lieu de l'ancienload_text)text_alignpermet de changer l'alignement du textetext_line_spacingpermet de changer l'interlignage du texte (ou des lignes, du coup...)- etc.
A noter que si je me lance dans la possibilité de charger plusieurs polices en même temps, un font_face fera sans doute son apparition...
Les fonctions ?
Et du coup, l'ensemble des fonctions (qui peut évoluer...)
font_border()Set the global thickness of a for font borderfont_fill()Set the global fill color for fontfont_size()Set size of text globaly. If no value, return current size.font_stroke()Set the global border color for fontfont_default()Set font-face using an embeded font at a given sizeload_font()Loads a font file (ttf, otf) at a given size from the specified folder or the system font directories, and makes it active for subsequent text() calls.text()Draws text using the font previously loaded with load_font()text_align()Set alignment of text globaly. You can use START, MIDDLE, END.text_contours()Convert text to polygon contours (list of coordinate)text_line_spacing()Set line spacing of text globaly. If no value, return current line spacing.text_lower()Converts a string to lowercasetext_upper()Converts a string to uppercasetext_wrap()Draws text using the font previously loaded with load_font(), wrap at a certain distance