Added support for .otf fonts

stb_truetype supports some .otf fonts, just exposed that functionality.
This commit is contained in:
Ray 2018-12-10 00:29:52 +01:00
parent a8ac6e2ef9
commit 7361ed24e2

View File

@ -272,7 +272,7 @@ Font LoadFont(const char *fileName)
Font font = { 0 };
#if defined(SUPPORT_FILEFORMAT_TTF)
if (IsFileExtension(fileName, ".ttf")) font = LoadFontEx(fileName, DEFAULT_TTF_FONTSIZE, DEFAULT_TTF_NUMCHARS, NULL);
if (IsFileExtension(fileName, ".ttf") || IsFileExtension(fileName, ".otf")) font = LoadFontEx(fileName, DEFAULT_TTF_FONTSIZE, DEFAULT_TTF_NUMCHARS, NULL);
else
#endif
#if defined(SUPPORT_FILEFORMAT_FNT)