Search the Community
Showing results for tags 'font'.
-
Required Tools: UABEA A Font Editor (FontLab, FontForge, etc.) UnityHub Python 3 For This Scripts TMP.py and Chr.py 1. Extract Original Font Files -Open game asset files (e.g., resources.assets) in UABEA. (This can vary from game to game, so you'll need to find the file containing the font yourself. To find it more easily, use AssetStudio and search for 'SDF'.) This guide will use "Yes, Your Grace 2" as an example. And ,n this game, the font files are located in resources.assets. -Ctrl+E and Filter by Texture2D (font atlases) and MonoBehaviour (font settings). Export the font files, Most font files often have "SDF" in their name. In my case it looks like these: -Texture2D: Use "Plugins" -> "Export to .png". -MonoBehaviour: Select and "Export Dump" as .txt. Ignore unused fonts like Unity's default LiberationSans, or language-specific fonts you don't need (e.g., NotoSans for Chinese, if not relevant). The specific default or example fonts provided by Unity can vary from one Unity version to another. When you import 'TMP Examples & Extras' later in the process, look for the same font names in your game. They are mostly not used. For these game i will edit the "PTF55F SDF" and "PTF55F_withShadow SDF" files. 2. Get the .TTF/.OTF Font File and Edit It - And Unity Version A-) In UABEA, filter by "Font" type to check if it's in game assets. If not, search online (e.g., "PTF55F font"). Use a font editor to add your new characters to this .ttf/.otf file. (I won't cover the font editing process here). B-) In UABEA, open any game asset file. Go to Tools -> Info. Note the Unity version. And go to the Download Archive and download the same version. And create a 2D Unity project. 3. Original Font Settings We need to find the original Font Setting first. Open the extracted MonoBehaviour files with a text editor. Search for "FontAssetCreationSettings" and you will see the Font Settings: PointSize= (92 for this font) Padding= (5 for this font) PackingMode= 0 Means Fast, 4 Means Optimum AtlasWidth= First One is Width AtlasHeight= Second One is Height Character Set= (Choose Custom Characters In Unity) CharacterSequence= If this part exists as characters, just copy them and add your characters, If it's unicode run the Chr.py script and convert to characters. (To use the Chr.py script, modify the line in this line "chr_list = convert_unicodelist("PasteYourUnicode")" by replacing "PasteYourUnicode" with the actual Unicode string from your game's file.) Render Mode= SMOOTH_HINTED = 4121 , SMOOTH = 4117 , COLOR_HINTED = 69656 , COLOR = 69652 , RASTER_HINTED = 4122 , RASTER = 4118, SDF = 4134 , SDF8 = 8230 SDF16 = 16422, SDF32 = 32806, SDFAA_HINTED = 4169, SDFAA = 4165 4. Font Asset Creator Open the unity project you earlier created. First of all, drag the otf/ttf file you modified to the Assets panel. On top panel click Window -> TextMeshPro -> Font Asset Creator. Import TMP Essentials and TMP Examples & Extras if prompted. Now we are on this window, select your font file at top. Character Sequence: Original sequence + your new characters. (Don't forget to add space) And apply the same PointSize, PackingMethod, Atlas Resolution, Render Mode values. Then click "Generate Font Atlas", then "Save As..." aa+original name to find it easy. (e.g., aaPTF55F SDF.asset) 5- Create GameObject On top panel click GameObject -> UI -> Text - TextMeshPro. Once you created the TMP, on right panel choose your font. And test the new characters. You need to do these for all of your fonts. 6. Building the Assets in Your Unity Project On top panel open File -> Build Settings -> Build Settings and click Build on right bottom. Open the build's "_Data/resources.assets file" (or sharedassets0.assets) in UABEA. Find your new font's Texture2D and MonoBehaviour. Extract them as .png and .txt, same as before. 7. Transfer Glyph Data (Backup your original MonoBehaviour files!) Create a new folder. Move your original MonoBehaviour files (Step 1) and New MonoBehaviour files into this folder. (Step 6). Rename your new MonoBehaviour files to: aa + [original_MonoBehaviour_filename.txt]. So my original file name is "PTF55F SDF-resources.assets-1241.txt" and i will rename the new font file as "aaPTF55F SDF-resources.assets-1241.txt" . And do these for other files too. Also move TMP.py into this folder. Run python TMP.py. And you will see original MonoBehaviour files are edited. .) You will import these modified files. 8- Import Modified Files into Game Open the original game's asset file (e.g., resources.assets) in UABEA. For each font: Texture2D: "Plugins" -> "Edit" -> "Load" and select atlas files from Step 6. MonoBehaviour: Click "Import Dump" and choose the modified MonoBehaviour files. And save the changes to the file. Ctrl+S And that's it! Credit: https://www.youtube.com/watch?v=iGFNGxwFP5w https://steamcommunity.com/sharedfiles/filedetails/?id=3023518241 https://steamcommunity.com/sharedfiles/filedetails/?id=2971356830
-
Hello I've been trying to translate LISA Definitive Edition I followed the guide but I have some issues with the tmpro. The tmpro font changes but it doesn't apply to the other menus the change only applies to main menu please help.
ResHax.com: Empowering Curious Minds in the World of Reverse Engineering
Delving into the Art of Code Unraveling: ResHax.com - Your Gateway to the Thrilling World of Reverse Engineering, Where Curiosity Meets Innovation!