Skip to content

Commit

Permalink
Don't fail the entire string if we can't load one of the glyphs
Browse files Browse the repository at this point in the history
We'll just use a 0x0 sized bitmap and won't render anything.
  • Loading branch information
slouken committed Jan 29, 2025
1 parent a11037f commit 4fbd661
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/SDL_ttf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2607,7 +2607,8 @@ static bool Load_Glyph(TTF_Font *font, c_glyph *cached, int want, int translatio
// Render the glyph
error = FT_Render_Glyph(slot, ft_render_mode);
if (error) {
return TTF_SetFTError("FT_Render_Glyph() failed", error);
// Don't fail entirely, just use a 0x0 sized bitmap
//return TTF_SetFTError("FT_Render_Glyph() failed", error);
}

// Access bitmap from slot
Expand Down

0 comments on commit 4fbd661

Please sign in to comment.