Backport freetype 2.11 fix from imgui.

This commit is contained in:
Bartosz Taudul 2021-09-20 22:45:52 +02:00
parent 0b03d7b2ad
commit 2a994f1c81
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -539,7 +539,8 @@ bool ImFontAtlasBuildWithFreeTypeEx(FT_Library ft_library, ImFontAtlas* atlas, u
// Render glyph into a bitmap (currently held by FreeType)
const FT_Bitmap* ft_bitmap = src_tmp.Font.RenderGlyphAndGetInfo(&src_glyph.Info);
IM_ASSERT(ft_bitmap);
if (ft_bitmap == NULL)
continue;
// Allocate new temporary chunk if needed
const int bitmap_size_in_bytes = src_glyph.Info.Width * src_glyph.Info.Height * 4;