mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-14 23:38:15 +00:00
ADDED: IsShaderReady()
, IsImageReady()
, IsFontReady()
, IsWaveReady()
, IsSoundReady()
, IsMusicReady()
(#2892)
These IsReady() functions provide a method in order to verify whether or not the object was loaded successfully. They're useful to make sure the assets are there prior to using them.
This commit is contained in:
@@ -535,6 +535,12 @@ Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int
|
||||
return font;
|
||||
}
|
||||
|
||||
// Check if a font is ready
|
||||
bool IsFontReady(Font font)
|
||||
{
|
||||
return font.glyphs != NULL;
|
||||
}
|
||||
|
||||
// Load font data for further use
|
||||
// NOTE: Requires TTF font memory data and can generate SDF data
|
||||
GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int glyphCount, int type)
|
||||
|
Reference in New Issue
Block a user