Skip to content

Commit

Permalink
ui: crash when loading asian fonts on windows
Browse files Browse the repository at this point in the history
FontNo must be reset to 0 for Font Awesome.
Issue #1503
Fixes MINIDUMP-314
  • Loading branch information
flyinghead committed May 6, 2024
1 parent f04e9d4 commit 7327e52
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/rend/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ void gui_initFonts()
// Font Awesome symbols (added to default font)
data = resource::load("fonts/" FONT_ICON_FILE_NAME_FAS, dataSize);
verify(data != nullptr);
font_cfg.FontNo = 0;
static ImWchar faRanges[] = { ICON_MIN_FA, ICON_MAX_FA, 0 };
io.Fonts->AddFontFromMemoryTTF(data.release(), dataSize, fontSize, &font_cfg, faRanges);
// Large font without Asian glyphs
Expand Down

0 comments on commit 7327e52

Please sign in to comment.