[rtext] Don't return default font if LoadFontEx fails (#4077)
It is currently impossible to check a font loaded successfully with IsFontReady because LoadFontEx will always return a valid font. DrawTextEx has this check: if (font.texture.id == 0) font = GetFontDefault(); // Security check in case of not valid font So anyone relying on the default font as a fallback for fonts failing to load should still be covered.
This commit is contained in:
parent
3e441ae98b
commit
dfabbd8ba8
1 changed files with 0 additions and 1 deletions
|
@ -394,7 +394,6 @@ Font LoadFontEx(const char *fileName, int fontSize, int *codepoints, int codepoi
|
||||||
|
|
||||||
UnloadFileData(fileData);
|
UnloadFileData(fileData);
|
||||||
}
|
}
|
||||||
else font = GetFontDefault();
|
|
||||||
|
|
||||||
return font;
|
return font;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue