diff --git a/src/common/path_util.cpp b/src/common/path_util.cpp index b0cbb10cf..1cf80430a 100644 --- a/src/common/path_util.cpp +++ b/src/common/path_util.cpp @@ -128,6 +128,10 @@ static auto UserPaths = [] { create_path(PathType::CustomTrophy, user_dir / CUSTOM_TROPHY); create_path(PathType::CustomConfigs, user_dir / CUSTOM_CONFIGS); create_path(PathType::CacheDir, user_dir / CACHE_DIR); + create_path(PathType::FontDir, user_dir / FONT_DIR); + // subdirectory for fonts + std::filesystem::create_directory(user_dir / FONT_DIR / "font"); + std::filesystem::create_directory(user_dir / FONT_DIR / "font2"); std::ofstream notice_file(user_dir / CUSTOM_TROPHY / "Notice.txt"); if (notice_file.is_open()) { @@ -144,6 +148,13 @@ static auto UserPaths = [] { notice_file.close(); } + std::ofstream font_instructions(user_dir / FONT_DIR / "Instructions.txt"); + if (font_instructions.is_open()) { + font_instructions << "Place /preinst/common/font contents into font folder\n" + "Place /system/common/font2 contents into font2 folder\n"; + font_instructions.close(); + } + return paths; }(); diff --git a/src/common/path_util.h b/src/common/path_util.h index fd2c18baa..f5979e3b2 100644 --- a/src/common/path_util.h +++ b/src/common/path_util.h @@ -25,6 +25,7 @@ enum class PathType { CustomTrophy, // Where custom files for trophies are stored. CustomConfigs, // Where custom files for different games are stored. CacheDir, // Where pipeline and shader cache is stored. + FontDir // Where font files are stored. }; constexpr auto PORTABLE_DIR = "user"; @@ -44,6 +45,7 @@ constexpr auto METADATA_DIR = "game_data"; constexpr auto CUSTOM_TROPHY = "custom_trophy"; constexpr auto CUSTOM_CONFIGS = "custom_configs"; constexpr auto CACHE_DIR = "cache"; +constexpr auto FONT_DIR = "sys_fonts"; // Filenames constexpr auto LOG_FILE = "shad_log.txt";