diff options
Diffstat (limited to 'cheatsheet/raylib_text.c')
| -rw-r--r-- | cheatsheet/raylib_text.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/cheatsheet/raylib_text.c b/cheatsheet/raylib_text.c index 8c41fe4..4dcd4c8 100644 --- a/cheatsheet/raylib_text.c +++ b/cheatsheet/raylib_text.c @@ -1,14 +1,13 @@ - // Font loading/unloading functions Font GetFontDefault(void); // Get the default Font Font LoadFont(const char *fileName); // Load font from file into GPU memory (VRAM) - Font LoadFontEx(const char *fileName, int fontSize, int *fontChars, int glyphCount); // Load font from file with extended parameters, use NULL for fontChars and 0 for glyphCount to load the default character set + Font LoadFontEx(const char *fileName, int fontSize, int *codepoints, int codepointCount); // Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set Font LoadFontFromImage(Image image, Color key, int firstChar); // Load font from Image (XNA style) - Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int glyphCount); // Load font from memory buffer, fileType refers to extension: i.e. '.ttf' + Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount); // Load font from memory buffer, fileType refers to extension: i.e. '.ttf' bool IsFontReady(Font font); // Check if a font is ready - GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int glyphCount, int type); // Load font data for further use - Image GenImageFontAtlas(const GlyphInfo *chars, Rectangle **recs, int glyphCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info - void UnloadFontData(GlyphInfo *chars, int glyphCount); // Unload font chars info data (RAM) + GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount, int type); // Load font data for further use + Image GenImageFontAtlas(const GlyphInfo *glyphs, Rectangle **glyphRecs, int glyphCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info + void UnloadFontData(GlyphInfo *glyphs, int glyphCount); // Unload font chars info data (RAM) void UnloadFont(Font font); // Unload font from GPU memory (VRAM) bool ExportFontAsCode(Font font, const char *fileName); // Export font as code file, returns true on success @@ -18,9 +17,10 @@ void DrawTextEx(Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text using font and additional parameters void DrawTextPro(Font font, const char *text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, Color tint); // Draw text using Font and pro parameters (rotation) void DrawTextCodepoint(Font font, int codepoint, Vector2 position, float fontSize, Color tint); // Draw one character (codepoint) - void DrawTextCodepoints(Font font, const int *codepoints, int count, Vector2 position, float fontSize, float spacing, Color tint); // Draw multiple character (codepoint) + void DrawTextCodepoints(Font font, const int *codepoints, int codepointCount, Vector2 position, float fontSize, float spacing, Color tint); // Draw multiple character (codepoint) // Text font info functions + void SetTextLineSpacing(int spacing); // Set vertical line spacing when drawing with line-breaks int MeasureText(const char *text, int fontSize); // Measure string width for default font Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing); // Measure string size for Font int GetGlyphIndex(Font font, int codepoint); // Get glyph index position in font for a codepoint (unicode character), fallback to '?' if not found |
