From a5b110b47eb9b1ab2f4f31fd3a85b20a2cc3a9f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sat, 16 May 2026 10:22:17 +0200 Subject: [PATCH 1/4] Fix problem with fallback fonts looking too bold --- Common/Render/Text/draw_text_sdl.cpp | 45 +++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 8 deletions(-) diff --git a/Common/Render/Text/draw_text_sdl.cpp b/Common/Render/Text/draw_text_sdl.cpp index 824a9ef9f66d..dbec9cbc43af 100644 --- a/Common/Render/Text/draw_text_sdl.cpp +++ b/Common/Render/Text/draw_text_sdl.cpp @@ -65,13 +65,13 @@ void TextDrawerSDL::PrepareFallbackFonts(std::string_view locale) { // To install the recommended Droid Sans fallback font in Ubuntu: // sudo apt install fonts-droid-fallback const char *hardcodedNames[] = { - "Droid Sans Medium", + "Droid Sans", "Droid Sans Fallback", - "Source Han Sans Medium", - "Noto Sans CJK Medium", - "Noto Sans Hebrew Medium", - "Noto Sans Lao Medium", - "Noto Sans Thai Medium", + "Source Han Sans", + "Noto Sans CJK", + "Noto Sans Hebrew", + "Noto Sans Lao", + "Noto Sans Thai", "DejaVu Sans Condensed", "DejaVu Sans", "Meera Regular", @@ -110,22 +110,51 @@ void TextDrawerSDL::PrepareFallbackFonts(std::string_view locale) { for (int i = 0; i < names.size(); i++) { // printf("trying font name %s\n", names[i]); FcPattern *name = FcNameParse((const FcChar8 *)names[i]); + FcPatternAddInteger(name, FC_WEIGHT, FC_WEIGHT_NORMAL); + FcPatternAddInteger(name, FC_SLANT, FC_SLANT_ROMAN); FcFontSet *foundFonts = FcFontList(config, name, os); + std::vector> preferredFonts; + std::vector> otherFonts; + for (int j = 0; foundFonts && j < foundFonts->nfont; ++j) { FcPattern* font = foundFonts->fonts[j]; FcChar8 *path; int fontIndex; + int fontWeight = FC_WEIGHT_NORMAL; if (FcPatternGetInteger(font, FC_INDEX, 0, &fontIndex) != FcResultMatch) { fontIndex = 0; // The 0th face is guaranteed to exist } + if (FcPatternGetInteger(font, FC_WEIGHT, 0, &fontWeight) != FcResultMatch) { + fontWeight = FC_WEIGHT_NORMAL; + } + if (FcPatternGetString(font, FC_FILE, 0, &path) == FcResultMatch) { std::string path_str((const char*)path); - // printf("fallback font: %s\n", path_str.c_str()); - fallbackFontPaths_.push_back(std::make_pair(path_str, fontIndex)); + if (fontWeight <= FC_WEIGHT_NORMAL) { + preferredFonts.push_back(std::make_pair(path_str, fontIndex)); + } else { + otherFonts.push_back(std::make_pair(path_str, fontIndex)); + } + } + } + + auto addFallbackUnique = [&](const std::pair &candidate) { + for (const auto &existing : fallbackFontPaths_) { + if (existing.first == candidate.first && existing.second == candidate.second) { + return; + } } + fallbackFontPaths_.push_back(candidate); + }; + + for (const auto &candidate : preferredFonts) { + addFallbackUnique(candidate); + } + for (const auto &candidate : otherFonts) { + addFallbackUnique(candidate); } if (foundFonts) { From 82e6f563d7a7f399ed70e26d154b236943222a71 Mon Sep 17 00:00:00 2001 From: Nemoumbra Date: Thu, 14 May 2026 01:59:25 +0300 Subject: [PATCH 2/4] Remove the outdated comment --- Common/SysError.h | 1 - 1 file changed, 1 deletion(-) diff --git a/Common/SysError.h b/Common/SysError.h index b425b34fdcb8..45352fe63272 100644 --- a/Common/SysError.h +++ b/Common/SysError.h @@ -5,6 +5,5 @@ // Generic function to get last error message. // Call directly after the command or use the error num. // This function might change the error code. -// Defined in Misc.cpp. std::string GetLastErrorMsg(); std::string GetStringErrorMsg(int errCode); From 32794d4b553af24b56de34f5399bf4eb9ba863e9 Mon Sep 17 00:00:00 2001 From: Hexagon Date: Fri, 15 May 2026 14:25:49 -0300 Subject: [PATCH 3/4] adhoc: add json status page link for the sprawl relay --- assets/adhoc-servers.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/adhoc-servers.json b/assets/adhoc-servers.json index ce647b59c955..43e90747e4cc 100644 --- a/assets/adhoc-servers.json +++ b/assets/adhoc-servers.json @@ -182,7 +182,7 @@ "location-emoji": "🇧🇷", "description": "For players looking to play any games", "data_mode": "AemuPostoffice", - "status_data_json": "" + "status_data_json": "https://status-brazil-01.sprawl-relay.link?format=aemu" } ] } From fa50bb1976065c4f8b1b47af227d367fe9771555 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sat, 16 May 2026 14:31:51 +0200 Subject: [PATCH 4/4] v1.20.4