shared_font.bin - 共享字库,某些汉化游戏使用的是系统字库,日区环境下需要指向外接中文字符集;当然可以直接选择中文区域则不需要shared_font.bin,但是某些游戏DLC在中文区域不可用。
Blader在
https://forum.cheatmaker.org/showtopic-2657.aspx分享过shared fonts,也说过shared_font.bin在此时便不必要;
后续官方也开始使用开源字库,这时候绝对大多游戏都不会有文字缺失问题。
汉化游戏用到系统字库的不少,但可供普通玩家选择的shared_font.bin文件却很少;在我玩第七龙神VFD的时候,发现模拟器没有ACG的0号字库可用,看着缺字(不在中文字符集的汉字)难受的玩,就想着自己琢磨着弄0号字库的shared_font.bin,
最终在贴吧的一篇文章看到了“生成Citra共享字库shared_font.bin”相关信息,地址:
https://tieba.baidu.com/p/6385644832首先要有.bcfnt文件,获得方式参考
https://github.com/dnasdw/SharedFontTool或
https://forum.cheatmaker.org/showtopic-3204.aspx;
然后是shared_font.bin文件头和规范,
https://github.com/citra-emu/cit ... service/apt/apt.cpp- struct {
- u32_le status;
- u32_le region;
- u32_le decompressed_size;
- INSERT_PADDING_WORDS(0x1D);
- } shared_font_header{};
- static_assert(sizeof(shared_font_header) == 0x80, "shared_font_header has incorrect size");
- shared_font_header.status = 2; // successfully loaded
- shared_font_header.region = font_region_code;
- shared_font_header.decompressed_size =
- DecompressLZ11(font_file.Data(), shared_font_mem->GetPointer(0x80));
- std::memcpy(shared_font_mem->GetPointer(), &shared_font_header, sizeof(shared_font_header));
- *shared_font_mem->GetPointer(0x83) = 'U'; // Change the magic from "CFNT" to "CFNU"
复制代码用HxD打开.bcfnt文件,在文件头部添加80个字节的“shared_font_header”
- 02 00 00 00 01 00 00 00 8C D2 2C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
复制代码第83个字节54改成55,
GetPointer(0x83) = 'U'最后另存为“shared_font.bin”,这样一个共享字库就完成了。
自制字库演示图: