Skip to content

Commit 8414d6e

Browse files
author
Uneven Prankster
committed
Added unsupported pixel format log warning
1 parent c7f7fa9 commit 8414d6e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/rtext.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2228,8 +2228,10 @@ static Font LoadBMFont(const char *fileName)
22282228
imFonts[i] = LoadImage(TextFormat("%s/%s", GetDirectoryPath(fileName), imFileName[i]));
22292229

22302230
PixelFormat format = imFonts[i].format;
2231-
if (format != PIXELFORMAT_UNCOMPRESSED_GRAYSCALE && format != PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 && format != PIXELFORMAT_UNCOMPRESSED_R8G8B8)
2231+
if (format != PIXELFORMAT_UNCOMPRESSED_GRAYSCALE && format != PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 && format != PIXELFORMAT_UNCOMPRESSED_R8G8B8){
2232+
TRACELOG(LOG_WARNING, "FONT: [%s] Page number %i used an unsupported pixel format", i, fileName);
22322233
continue;
2234+
}
22332235

22342236
// Convert image to GRAYSCALE + ALPHA, using the mask as the alpha channel
22352237
Image imFontAlpha = {

0 commit comments

Comments
 (0)