From 6dfc446e2358023d6b3daacedd7fb801842c808c Mon Sep 17 00:00:00 2001 From: scawful Date: Sat, 27 Sep 2025 22:04:59 -0400 Subject: [PATCH] Refactor font initialization in LoadPackageFonts function - Updated font configuration to include proper ImFontConfig initialization for each font entry in the font registry. - Enhanced code clarity by adding comments to describe the initialization process. --- src/app/core/platform/font_loader.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/core/platform/font_loader.cc b/src/app/core/platform/font_loader.cc index e3216ee6..e5ca79de 100644 --- a/src/app/core/platform/font_loader.cc +++ b/src/app/core/platform/font_loader.cc @@ -101,13 +101,13 @@ absl::Status AddJapaneseFont(const FontConfig& /*config*/) { absl::Status LoadPackageFonts() { if (font_registry.fonts.empty()) { - // Initialize the font names and sizes + // Initialize the font names and sizes with proper ImFontConfig initialization font_registry.fonts = { - FontConfig{KARLA_REGULAR, FONT_SIZE_DEFAULT}, - FontConfig{ROBOTO_MEDIUM, FONT_SIZE_DEFAULT}, - FontConfig{COUSINE_REGULAR, FONT_SIZE_DEFAULT}, - FontConfig{IBM_PLEX_JP, FONT_SIZE_DEFAULT}, - FontConfig{DROID_SANS, FONT_SIZE_DROID_SANS}, + FontConfig{KARLA_REGULAR, FONT_SIZE_DEFAULT, {}, {}}, + FontConfig{ROBOTO_MEDIUM, FONT_SIZE_DEFAULT, {}, {}}, + FontConfig{COUSINE_REGULAR, FONT_SIZE_DEFAULT, {}, {}}, + FontConfig{IBM_PLEX_JP, FONT_SIZE_DEFAULT, {}, {}}, + FontConfig{DROID_SANS, FONT_SIZE_DROID_SANS, {}, {}}, }; }