Преглед изворни кода

[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.
pull/4109/head
Peter0x44 пре 5 месеци
committed by GitHub
родитељ
комит
dfabbd8ba8
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 измењених фајлова са 0 додато и 1 уклоњено
  1. +0
    -1
      src/rtext.c

+ 0
- 1
src/rtext.c Прегледај датотеку

@ -394,7 +394,6 @@ Font LoadFontEx(const char *fileName, int fontSize, int *codepoints, int codepoi
UnloadFileData(fileData);
}
else font = GetFontDefault();
return font;
}

Loading…
Откажи
Сачувај