From 241299bf01a2a270337a452a8f1f2ea7511c3b78 Mon Sep 17 00:00:00 2001 From: Edgar Maurel Date: Wed, 7 Oct 2026 18:26:20 +0200 Subject: [PATCH] test(font): move the console font aside instead of deleting it while its face is mapped On Windows 10 a file with a mapped view cannot be deleted, and FreeType's Windows stream keeps the face's file mapped, so removing SST-Bold.otf threw and ended guest_system_font. Moving it out of the font directory leaves nothing at the original path and works on every host. Co-Authored-By: Claude Opus 5.5 --- core/libs/tests/GuestSystemFont.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/libs/tests/GuestSystemFont.cpp b/core/libs/tests/GuestSystemFont.cpp index 53f205e5d..bfe2db05a 100644 --- a/core/libs/tests/GuestSystemFont.cpp +++ b/core/libs/tests/GuestSystemFont.cpp @@ -196,7 +196,7 @@ int main() { FontHandle missing = nullptr; Require(sceFontOpenFontSet(library, ChineseGb, 1, nullptr, &missing) == SCE_FONT_ERROR_FONT_OPEN_FAILED && missing == nullptr); - std::filesystem::remove(fonts / "SST-Bold.otf"); + std::filesystem::rename(fonts / "SST-Bold.otf", root / "SST-Bold.otf"); FontHandle substitute = nullptr; Require(sceFontOpenFontSet(library, EuropeanBold, 3, nullptr, &substitute) == SCE_FONT_OK); Require(sceFontSetScalePixel(substitute, 100.0f, 100.0f) == SCE_FONT_OK);