├── .gitignore ├── I18NFont4UnityGame ├── I18NFont4UnityGame.sln └── I18NFont4UnityGame │ ├── I18NFont4UnityGame.cs │ ├── I18NFont4UnityGame.csproj │ └── Properties │ └── AssemblyInfo.cs ├── README.md ├── README_CN.md └── Unity2021Fonts ├── sarasa_gothic ├── source_han_sans └── unifont /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Aa][Rr][Mm]/ 27 | [Aa][Rr][Mm]64/ 28 | bld/ 29 | [Bb]in/ 30 | [Oo]bj/ 31 | [Ll]og/ 32 | [Ll]ogs/ 33 | 34 | # Visual Studio 2015/2017 cache/options directory 35 | .vs/ 36 | # Uncomment if you have tasks that create the project's static files in wwwroot 37 | #wwwroot/ 38 | 39 | # Visual Studio 2017 auto generated files 40 | Generated\ Files/ 41 | 42 | # MSTest test Results 43 | [Tt]est[Rr]esult*/ 44 | [Bb]uild[Ll]og.* 45 | 46 | # NUnit 47 | *.VisualState.xml 48 | TestResult.xml 49 | nunit-*.xml 50 | 51 | # Build Results of an ATL Project 52 | [Dd]ebugPS/ 53 | [Rr]eleasePS/ 54 | dlldata.c 55 | 56 | # Benchmark Results 57 | BenchmarkDotNet.Artifacts/ 58 | 59 | # .NET Core 60 | project.lock.json 61 | project.fragment.lock.json 62 | artifacts/ 63 | 64 | # StyleCop 65 | StyleCopReport.xml 66 | 67 | # Files built by Visual Studio 68 | *_i.c 69 | *_p.c 70 | *_h.h 71 | *.ilk 72 | *.meta 73 | *.obj 74 | *.iobj 75 | *.pch 76 | *.pdb 77 | *.ipdb 78 | *.pgc 79 | *.pgd 80 | *.rsp 81 | *.sbr 82 | *.tlb 83 | *.tli 84 | *.tlh 85 | *.tmp 86 | *.tmp_proj 87 | *_wpftmp.csproj 88 | *.log 89 | *.vspscc 90 | *.vssscc 91 | .builds 92 | *.pidb 93 | *.svclog 94 | *.scc 95 | 96 | # Chutzpah Test files 97 | _Chutzpah* 98 | 99 | # Visual C++ cache files 100 | ipch/ 101 | *.aps 102 | *.ncb 103 | *.opendb 104 | *.opensdf 105 | *.sdf 106 | *.cachefile 107 | *.VC.db 108 | *.VC.VC.opendb 109 | 110 | # Visual Studio profiler 111 | *.psess 112 | *.vsp 113 | *.vspx 114 | *.sap 115 | 116 | # Visual Studio Trace Files 117 | *.e2e 118 | 119 | # TFS 2012 Local Workspace 120 | $tf/ 121 | 122 | # Guidance Automation Toolkit 123 | *.gpState 124 | 125 | # ReSharper is a .NET coding add-in 126 | _ReSharper*/ 127 | *.[Rr]e[Ss]harper 128 | *.DotSettings.user 129 | 130 | # TeamCity is a build add-in 131 | _TeamCity* 132 | 133 | # DotCover is a Code Coverage Tool 134 | *.dotCover 135 | 136 | # AxoCover is a Code Coverage Tool 137 | .axoCover/* 138 | !.axoCover/settings.json 139 | 140 | # Visual Studio code coverage results 141 | *.coverage 142 | *.coveragexml 143 | 144 | # NCrunch 145 | _NCrunch_* 146 | .*crunch*.local.xml 147 | nCrunchTemp_* 148 | 149 | # MightyMoose 150 | *.mm.* 151 | AutoTest.Net/ 152 | 153 | # Web workbench (sass) 154 | .sass-cache/ 155 | 156 | # Installshield output folder 157 | [Ee]xpress/ 158 | 159 | # DocProject is a documentation generator add-in 160 | DocProject/buildhelp/ 161 | DocProject/Help/*.HxT 162 | DocProject/Help/*.HxC 163 | DocProject/Help/*.hhc 164 | DocProject/Help/*.hhk 165 | DocProject/Help/*.hhp 166 | DocProject/Help/Html2 167 | DocProject/Help/html 168 | 169 | # Click-Once directory 170 | publish/ 171 | 172 | # Publish Web Output 173 | *.[Pp]ublish.xml 174 | *.azurePubxml 175 | # Note: Comment the next line if you want to checkin your web deploy settings, 176 | # but database connection strings (with potential passwords) will be unencrypted 177 | *.pubxml 178 | *.publishproj 179 | 180 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 181 | # checkin your Azure Web App publish settings, but sensitive information contained 182 | # in these scripts will be unencrypted 183 | PublishScripts/ 184 | 185 | # NuGet Packages 186 | *.nupkg 187 | # NuGet Symbol Packages 188 | *.snupkg 189 | # The packages folder can be ignored because of Package Restore 190 | **/[Pp]ackages/* 191 | # except build/, which is used as an MSBuild target. 192 | !**/[Pp]ackages/build/ 193 | # Uncomment if necessary however generally it will be regenerated when needed 194 | #!**/[Pp]ackages/repositories.config 195 | # NuGet v3's project.json files produces more ignorable files 196 | *.nuget.props 197 | *.nuget.targets 198 | 199 | # Microsoft Azure Build Output 200 | csx/ 201 | *.build.csdef 202 | 203 | # Microsoft Azure Emulator 204 | ecf/ 205 | rcf/ 206 | 207 | # Windows Store app package directories and files 208 | AppPackages/ 209 | BundleArtifacts/ 210 | Package.StoreAssociation.xml 211 | _pkginfo.txt 212 | *.appx 213 | *.appxbundle 214 | *.appxupload 215 | 216 | # Visual Studio cache files 217 | # files ending in .cache can be ignored 218 | *.[Cc]ache 219 | # but keep track of directories ending in .cache 220 | !?*.[Cc]ache/ 221 | 222 | # Others 223 | ClientBin/ 224 | ~$* 225 | *~ 226 | *.dbmdl 227 | *.dbproj.schemaview 228 | *.jfm 229 | *.pfx 230 | *.publishsettings 231 | orleans.codegen.cs 232 | 233 | # Including strong name files can present a security risk 234 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 235 | #*.snk 236 | 237 | # Since there are multiple workflows, uncomment next line to ignore bower_components 238 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 239 | #bower_components/ 240 | 241 | # RIA/Silverlight projects 242 | Generated_Code/ 243 | 244 | # Backup & report files from converting an old project file 245 | # to a newer Visual Studio version. Backup files are not needed, 246 | # because we have git ;-) 247 | _UpgradeReport_Files/ 248 | Backup*/ 249 | UpgradeLog*.XML 250 | UpgradeLog*.htm 251 | ServiceFabricBackup/ 252 | *.rptproj.bak 253 | 254 | # SQL Server files 255 | *.mdf 256 | *.ldf 257 | *.ndf 258 | 259 | # Business Intelligence projects 260 | *.rdl.data 261 | *.bim.layout 262 | *.bim_*.settings 263 | *.rptproj.rsuser 264 | *- [Bb]ackup.rdl 265 | *- [Bb]ackup ([0-9]).rdl 266 | *- [Bb]ackup ([0-9][0-9]).rdl 267 | 268 | # Microsoft Fakes 269 | FakesAssemblies/ 270 | 271 | # GhostDoc plugin setting file 272 | *.GhostDoc.xml 273 | 274 | # Node.js Tools for Visual Studio 275 | .ntvs_analysis.dat 276 | node_modules/ 277 | 278 | # Visual Studio 6 build log 279 | *.plg 280 | 281 | # Visual Studio 6 workspace options file 282 | *.opt 283 | 284 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 285 | *.vbw 286 | 287 | # Visual Studio LightSwitch build output 288 | **/*.HTMLClient/GeneratedArtifacts 289 | **/*.DesktopClient/GeneratedArtifacts 290 | **/*.DesktopClient/ModelManifest.xml 291 | **/*.Server/GeneratedArtifacts 292 | **/*.Server/ModelManifest.xml 293 | _Pvt_Extensions 294 | 295 | # Paket dependency manager 296 | .paket/paket.exe 297 | paket-files/ 298 | 299 | # FAKE - F# Make 300 | .fake/ 301 | 302 | # CodeRush personal settings 303 | .cr/personal 304 | 305 | # Python Tools for Visual Studio (PTVS) 306 | __pycache__/ 307 | *.pyc 308 | 309 | # Cake - Uncomment if you are using it 310 | # tools/** 311 | # !tools/packages.config 312 | 313 | # Tabs Studio 314 | *.tss 315 | 316 | # Telerik's JustMock configuration file 317 | *.jmconfig 318 | 319 | # BizTalk build output 320 | *.btp.cs 321 | *.btm.cs 322 | *.odx.cs 323 | *.xsd.cs 324 | 325 | # OpenCover UI analysis results 326 | OpenCover/ 327 | 328 | # Azure Stream Analytics local run output 329 | ASALocalRun/ 330 | 331 | # MSBuild Binary and Structured Log 332 | *.binlog 333 | 334 | # NVidia Nsight GPU debugger configuration file 335 | *.nvuser 336 | 337 | # MFractors (Xamarin productivity tool) working folder 338 | .mfractor/ 339 | 340 | # Local History for Visual Studio 341 | .localhistory/ 342 | 343 | # BeatPulse healthcheck temp database 344 | healthchecksdb 345 | 346 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 347 | MigrationBackup/ 348 | 349 | # Ionide (cross platform F# VS Code tools) working folder 350 | .ionide/ 351 | -------------------------------------------------------------------------------- /I18NFont4UnityGame/I18NFont4UnityGame.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.31515.178 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "I18NFont4UnityGame", "I18NFont4UnityGame\I18NFont4UnityGame.csproj", "{908CA800-1E6C-4956-A429-5ABED633F5F1}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {908CA800-1E6C-4956-A429-5ABED633F5F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {908CA800-1E6C-4956-A429-5ABED633F5F1}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {908CA800-1E6C-4956-A429-5ABED633F5F1}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {908CA800-1E6C-4956-A429-5ABED633F5F1}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {09B0D25C-4AAA-4C9F-9E5D-A02A5BF29836} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /I18NFont4UnityGame/I18NFont4UnityGame/I18NFont4UnityGame.cs: -------------------------------------------------------------------------------- 1 | using BepInEx; 2 | using BepInEx.Configuration; 3 | using HarmonyLib; 4 | using System; 5 | using System.IO; 6 | using TMPro; 7 | using UnityEngine; 8 | using UnityEngine.UI; 9 | 10 | namespace xiaoye97 11 | { 12 | [BepInPlugin("xiaoye97.I18NFont4UnityGame", "I18NFont4UnityGame", "1.0")] 13 | public class I18NFont4UnityGame : BaseUnityPlugin 14 | { 15 | public static I18NFont4UnityGame Inst; 16 | public static Font TranslateFont; 17 | public static TMP_FontAsset TMPTranslateFont; 18 | public static ConfigEntry FontName; 19 | 20 | private void Start() 21 | { 22 | Inst = this; 23 | FontName = Config.Bind("config", "FontName", "unifont", "put font package to /BepInEx/plugins/I18NFont4UnityGame"); 24 | LoadFont(FontName.Value); 25 | Harmony.CreateAndPatchAll(typeof(I18NFont4UnityGame)); 26 | Logger.LogInfo("Loaded I18NFont4UnityGame Plugin."); 27 | } 28 | 29 | /// 30 | /// 加载字体 31 | /// 32 | /// 字体名称 33 | public void LoadFont(string fontName) 34 | { 35 | try 36 | { 37 | string path = $"{Paths.PluginPath}/I18NFont4UnityGame/{fontName}"; 38 | if (File.Exists(path)) 39 | { 40 | var ab = AssetBundle.LoadFromFile(path); 41 | TranslateFont = ab.LoadAsset(fontName); 42 | TMPTranslateFont = ab.LoadAsset($"{fontName} SDF"); 43 | if (TranslateFont != null && TMPTranslateFont != null) 44 | { 45 | Logger.LogInfo($"Loaded {fontName}."); 46 | } 47 | else 48 | { 49 | Logger.LogError($"The font file is damaged. Please check the file."); 50 | } 51 | ab.Unload(false); 52 | } 53 | else 54 | { 55 | Logger.LogError($"Font {fontName} not found, Please check the path: {path}"); 56 | } 57 | } 58 | catch (Exception e) 59 | { 60 | Logger.LogError($"Load font exception:{e.Message}\n{e.StackTrace}"); 61 | } 62 | } 63 | 64 | /// 65 | /// 修改字体 66 | /// 67 | [HarmonyPostfix, HarmonyPatch(typeof(Text), "OnEnable")] 68 | public static void FontPatch(Text __instance) 69 | { 70 | if (__instance.font.name != TranslateFont.name) 71 | { 72 | __instance.font = TranslateFont; 73 | } 74 | } 75 | 76 | /// 77 | /// 修改TMP字体 78 | /// 79 | [HarmonyPostfix, HarmonyPatch(typeof(TextMeshProUGUI), "OnEnable")] 80 | public static void TMPFontPatch(TextMeshProUGUI __instance) 81 | { 82 | if (__instance.font.name != TMPTranslateFont.name) 83 | { 84 | __instance.font = TMPTranslateFont; 85 | } 86 | } 87 | 88 | /// 89 | /// 如果有不显示的文本,则设置显示方式为溢出 90 | /// 91 | [HarmonyPostfix, HarmonyPatch(typeof(TextMeshProUGUI), "InternalUpdate")] 92 | public static void TMPFontPatch2(TextMeshProUGUI __instance) 93 | { 94 | if (__instance.font == TMPTranslateFont) 95 | { 96 | if (__instance.overflowMode != TextOverflowModes.Overflow) 97 | { 98 | if (__instance.preferredWidth > 1 && __instance.bounds.extents == Vector3.zero) 99 | { 100 | __instance.overflowMode = TextOverflowModes.Overflow; 101 | } 102 | } 103 | } 104 | } 105 | } 106 | } -------------------------------------------------------------------------------- /I18NFont4UnityGame/I18NFont4UnityGame/I18NFont4UnityGame.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {908CA800-1E6C-4956-A429-5ABED633F5F1} 8 | Library 9 | Properties 10 | I18NFont4UnityGame 11 | I18NFont4UnityGame 12 | v4.7.1 13 | 512 14 | true 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | pdbonly 27 | true 28 | bin\Release\ 29 | TRACE 30 | prompt 31 | 4 32 | 33 | 34 | 35 | ..\..\..\..\SteamLibrary\steamapps\common\Starmancer\BepInEx\core\0Harmony.dll 36 | False 37 | 38 | 39 | ..\..\..\..\SteamLibrary\steamapps\common\Starmancer\BepInEx\core\BepInEx.dll 40 | False 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | ..\..\..\..\SteamLibrary\steamapps\common\Starmancer\Starmancer_Data\Managed\Unity.TextMeshPro.dll 52 | False 53 | 54 | 55 | ..\..\..\..\SteamLibrary\steamapps\common\Starmancer\Starmancer_Data\Managed\UnityEngine.dll 56 | False 57 | 58 | 59 | ..\..\..\..\SteamLibrary\steamapps\common\Starmancer\Starmancer_Data\Managed\UnityEngine.AssetBundleModule.dll 60 | False 61 | 62 | 63 | ..\..\..\..\SteamLibrary\steamapps\common\Starmancer\Starmancer_Data\Managed\UnityEngine.CoreModule.dll 64 | False 65 | 66 | 67 | ..\..\..\..\SteamLibrary\steamapps\common\Starmancer\Starmancer_Data\Managed\UnityEngine.TextCoreModule.dll 68 | False 69 | 70 | 71 | ..\..\..\..\SteamLibrary\steamapps\common\Starmancer\Starmancer_Data\Managed\UnityEngine.TextRenderingModule.dll 72 | False 73 | 74 | 75 | ..\..\..\..\SteamLibrary\steamapps\common\Starmancer\Starmancer_Data\Managed\UnityEngine.UI.dll 76 | False 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /I18NFont4UnityGame/I18NFont4UnityGame/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的一般信息由以下 6 | // 控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("I18NFont4UnityGame")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("I18NFont4UnityGame")] 13 | [assembly: AssemblyCopyright("Copyright © 2021")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 会使此程序集中的类型 18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 19 | //请将此类型的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("908ca800-1e6c-4956-a429-5abed633f5f1")] 24 | 25 | // 程序集的版本信息由下列四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 生成号 30 | // 修订号 31 | // 32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 33 | //通过使用 "*",如下所示: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # I18NFont4UnityGame 2 | **[中文文档](README_CN.md)** 3 | 4 | I18NFont4UnityGame is a plugin I made for translate unity game, based on [BepInEx](https://github.com/BepInEx/BepInEx). 5 | 6 | It can load custom font packages to fix the problem of missing fonts in the game. 7 | 8 | ## How to use 9 | 10 | 1. Install BepInEx for the target game 11 | 2. Clone repositories 12 | 3. Open with visual studio 2019 13 | 4. Modify the reference DLL according to the target game 14 | 5. Compile this plugin 15 | 6. Put the plugin into the GameName/BepInEx/plugins/I18NFont4UnityGame/ folder 16 | 7. Put the font package into the GameName/BepInEx/plugins/I18NFont4UnityGame/ folder 17 | 8. Modify the FontName value in the configuration file to the font name (if there is no configuration file, start a game to generate) 18 | 9. Enter the game 19 | 20 | ## Recommended font 21 | 22 | - `Source Han Sans` [Font Package File](UnityFonts/source_han_sans) Good looking fonts suitable for China, Japan, South Korea and other places [https://github.com/adobe-fonts/source-han-sans](https://github.com/adobe-fonts/source-han-sans) 23 | - `Unifont` [Font Package File](UnityFonts/unifont) Applicable to almost all regions, but not very clear [http://unifoundry.com/unifont/index.html](http://unifoundry.com/unifont/index.html) 24 | 25 | ## How to make font package 26 | 27 | 1. Install unity which is the same as the game version 28 | 2. Create a new project and install AssetBundleBrowser in PackageManager 29 | 3. Change the font file name you want to make into a font package to all lowercase 30 | 4. Put the font into unity 31 | 5. Select the font and right-click, select Create->TextSeshPro->Font Asset 32 | 6. Adjust TMP atlas settings, such as sampling rate, to achieve the desired effect 33 | 7. On the Inspector panel, set the AssetBundle name for the imported font and TMP font. The name should be all lowercase and consistent with the file name of the font 34 | 8. Open window - > Asset Bundle Browser to Package Fonts 35 | 9. Put the generated font package into the GameName/BepInEx/plugins/I18NFont4UnityGame/ folder 36 | 37 | ## Translation projects I participated 38 | 39 | 1. [VRoidChinese](https://github.com/xiaoye97/VRoidChinese) 40 | 2. [StarmancerChinese](https://youhanhua.com/527.html) -------------------------------------------------------------------------------- /README_CN.md: -------------------------------------------------------------------------------- 1 | # I18NFont4UnityGame 2 | 3 | I18NFont4UnityGame是我为了汉化Unity游戏所制作的插件,基于[BepInEx](https://github.com/BepInEx/BepInEx)框架。 4 | 5 | 它可以加载自定义的字体包,用于弥补游戏内字库不全的问题。 6 | 7 | ## 如何使用 8 | 9 | 1. 为目标游戏安装BepInEx 10 | 2. Clone本仓库 11 | 3. 使用VisualStudio2019打开 12 | 4. 根据目标游戏修改引用dll 13 | 5. 编译此插件 14 | 6. 将此插件放入 GameName/BepInEx/plugins/I18NFont4UnityGame/ 文件夹 15 | 7. 将目标字体放入 GameName/BepInEx/plugins/I18NFont4UnityGame/ 文件夹 16 | 8. 修改配置文件中的FontName值为字体名字(如果没有配置文件,启动一次游戏以生成) 17 | 9. 进入游戏 18 | 19 | ## 推荐字体 20 | - `思源黑体` [字体包文件](UnityFonts/source_han_sans) 适用于中国日本韩国等地的比较好看的字体 [https://github.com/adobe-fonts/source-han-sans](https://github.com/adobe-fonts/source-han-sans) 21 | - `Unifont` [字体包文件](UnityFonts/unifont) 适用于几乎所有地区,但是不太清晰 [http://unifoundry.com/unifont/index.html](http://unifoundry.com/unifont/index.html) 22 | 23 | ## 如何制作字体包 24 | 25 | 1. 安装与游戏版本相同的Unity 26 | 2. 新建一个项目,在PackageManager安装AssetBundleBrowser 27 | 3. 将想要做成字体包的字体改名为全小写 28 | 4. 将字体放入Unity 29 | 5. 选中字体,右键Create->TextMeshPro->Font Asset 30 | 6. 调整TMP图集设置,如采样率等,以达到自己想要的效果 31 | 7. 在Inspector面板为导入的字体和TMP字体设置AssetBundle名,名字要全小写,和字体的文件名一致 32 | 8. 打开Window->Asset Bundle Browser,打包字体 33 | 9. 将生成的字体包放入 GameName/BepInEx/plugins/I18NFont4UnityGame/ 文件夹 34 | 35 | ## 我参与的汉化项目 36 | 37 | 1. [VRoidStudio汉化](https://github.com/xiaoye97/VRoidChinese) 38 | 2. [星际漫游者汉化](https://youhanhua.com/527.html) -------------------------------------------------------------------------------- /Unity2021Fonts/sarasa_gothic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoye97/I18NFont4UnityGame/772e8e754456cde31628a467ee32f99d2ba3c4ac/Unity2021Fonts/sarasa_gothic -------------------------------------------------------------------------------- /Unity2021Fonts/source_han_sans: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoye97/I18NFont4UnityGame/772e8e754456cde31628a467ee32f99d2ba3c4ac/Unity2021Fonts/source_han_sans -------------------------------------------------------------------------------- /Unity2021Fonts/unifont: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoye97/I18NFont4UnityGame/772e8e754456cde31628a467ee32f99d2ba3c4ac/Unity2021Fonts/unifont --------------------------------------------------------------------------------