1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-09 23:54:20 +00:00

Fonts: Change ImFontConfig::FontNo back to int from S8 (#8775)

When used with FreeType this value is passed as `face_index` which needs to be 32-bits.

# Conflicts:
#	docs/CHANGELOG.txt
This commit is contained in:
Matthew Pohlmann 2025-07-05 08:51:58 -07:00 committed by ocornut
parent fd75bdccb0
commit 0448428322
3 changed files with 7 additions and 3 deletions

View file

@ -174,7 +174,7 @@ struct ImGui_ImplFreeType_FontSrcBakedData
bool ImGui_ImplFreeType_FontSrcData::InitFont(FT_Library ft_library, ImFontConfig* src, ImGuiFreeTypeLoaderFlags extra_font_loader_flags)
{
FT_Error error = FT_New_Memory_Face(ft_library, (uint8_t*)src->FontData, (uint32_t)src->FontDataSize, (uint32_t)src->FontNo, &FtFace);
FT_Error error = FT_New_Memory_Face(ft_library, (uint8_t*)src->FontData, (FT_Long)src->FontDataSize, (FT_Long)src->FontNo, &FtFace);
if (error != 0)
return false;
error = FT_Select_Charmap(FtFace, FT_ENCODING_UNICODE);