mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-08 12:28:15 +00:00
Moved raylib webpage to docs folder
raylib webpage has been completely reorganized and moved from gh-pages (a pain to work with) to docs folder. Useless libs have been removed, webs have been renamed, etc. Now it would be easier (hopefully) to update webpage. :)
This commit is contained in:
19
docs/cheatsheet/raylib_text.c
Normal file
19
docs/cheatsheet/raylib_text.c
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
// SpriteFont loading/unloading functions
|
||||
SpriteFont GetDefaultFont(void); // Get the default SpriteFont
|
||||
SpriteFont LoadSpriteFont(const char *fileName); // Load a SpriteFont image into GPU memory
|
||||
SpriteFont LoadSpriteFontTTF(const char *fileName, int fontSize, int numChars, int *fontChars); // Load a SpriteFont from TTF font with parameters
|
||||
void UnloadSpriteFont(SpriteFont spriteFont); // Unload SpriteFont from GPU memory
|
||||
|
||||
// Text drawing functions
|
||||
void DrawText(const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font)
|
||||
void DrawTextEx(SpriteFont spriteFont, const char* text, Vector2 position, // Draw text using SpriteFont and additional parameters
|
||||
int fontSize, int spacing, Color tint);
|
||||
void DrawFPS(int posX, int posY); // Shows current FPS on top-left corner
|
||||
|
||||
// Text misc. functions
|
||||
int MeasureText(const char *text, int fontSize); // Measure string width for default font
|
||||
Vector2 MeasureTextEx(SpriteFont spriteFont, const char *text, int fontSize, int spacing); // Measure string size for SpriteFont
|
||||
const char *FormatText(const char *text, ...); // Formatting of text with variables to 'embed'
|
||||
const char *SubText(const char *text, int position, int length); // Get a piece of a text string
|
||||
|
Reference in New Issue
Block a user