mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-22 07:03:38 +00:00
Better support zh_gb.pgf
This commit is contained in:
parent
a0a4d3cd24
commit
390ecb3184
@ -645,9 +645,26 @@ static void __LoadInternalFonts() {
|
||||
if (!pspFileSystem.GetFileInfo(fontPath).exists) {
|
||||
pspFileSystem.MkDir(fontPath);
|
||||
}
|
||||
if (pspFileSystem.GetFileInfo("disc0:/PSP_GAME/USRDIR/zh_gb.pgf").exists) {
|
||||
for (size_t i = 0; i < ARRAY_SIZE(fontRegistry); i++) {
|
||||
const FontRegistryEntry &entry = fontRegistry[i];
|
||||
std::string fontFilename = userfontPath + entry.fileName;
|
||||
PSPFileInfo info = pspFileSystem.GetFileInfo(fontFilename);
|
||||
DEBUG_LOG(SCEFONT, "Loading internal font %s (%i bytes)", fontFilename.c_str(), (int)info.size);
|
||||
std::vector<u8> buffer;
|
||||
if (pspFileSystem.ReadEntireFile(fontFilename, buffer) < 0) {
|
||||
ERROR_LOG(SCEFONT, "Failed opening font");
|
||||
continue;
|
||||
}
|
||||
internalFonts.push_back(new Font(buffer, entry));
|
||||
DEBUG_LOG(SCEFONT, "Loaded font %s", fontFilename.c_str());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < ARRAY_SIZE(fontRegistry); i++) {
|
||||
const FontRegistryEntry &entry = fontRegistry[i];
|
||||
std::string fontFilename = userfontPath + entry.fileName;
|
||||
std::string fontFilename = userfontPath + entry.fileName;
|
||||
PSPFileInfo info = pspFileSystem.GetFileInfo(fontFilename);
|
||||
|
||||
if (!info.exists) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user