mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 00:22:57 -05:00
test(font): avoid deleting an open system font on windows
This commit is contained in:
1 parent
1b3da3a740
commit
e5cd1c6079
1 file changed
+4
-1
@@ -197,7 +197,10 @@ int main() {
|
||||
FontHandle missing = nullptr;
|
||||
Require(sceFontOpenFontSet(library, ChineseGb, 1, nullptr, &missing) == SCE_FONT_ERROR_FONT_OPEN_FAILED && missing == nullptr);
|
||||
|
||||
std::filesystem::rename(fonts / "SST-Bold.otf", root / "SST-Bold.otf");
|
||||
const auto substituteFonts = root / "substitute-fonts";
|
||||
std::filesystem::create_directories(substituteFonts);
|
||||
WriteFile(substituteFonts / "NotoSans-Bold.ttf", SquareGlyphFont('A', 300));
|
||||
SetFontDirectory(substituteFonts);
|
||||
FontHandle substitute = nullptr;
|
||||
Require(sceFontOpenFontSet(library, EuropeanBold, 3, nullptr, &substitute) == SCE_FONT_OK);
|
||||
Require(sceFontSetScalePixel(substitute, 100.0f, 100.0f) == SCE_FONT_OK);
|
||||
|
||||
Reference in new issue
Block a user