bbepis / XUnity.AutoTranslator

MIT License
2.02k stars 293 forks source link

please help me. create 1 pdf font with Vietnamese characters #182

Open nonamebatbai opened 3 years ago

nonamebatbai commented 3 years ago

please help me. add sdf fonts with Vietnamese characters to your fonts. please in here is missing the character https://jrgraphix.net/r/Unicode/1E00-1EFF Ạ 1EA0 ạ 1EA1 Ả 1EA2 ả 1EA3 Ấ 1EA4 ấ 1EA5 Ầ 1EA6 ầ 1EA7 Ẩ 1EA8 ẩ 1EA9 Ẫ 1EAA ẫ 1EAB Ậ 1EAC ậ 1EAD Ắ 1EAE ắ 1EAF Ằ 1EB0 ằ 1EB1 Ẳ 1EB2 ẳ 1EB3 Ẵ 1EB4 ẵ 1EB5 Ặ 1EB6 ặ 1EB7 Ẹ 1EB8 ẹ 1EB9 Ẻ 1EBA ẻ 1EBB Ẽ 1EBC ẽ 1EBD Ế 1EBE ế 1EBF Ề 1EC0 ề 1EC1 Ể 1EC2 ể 1EC3 Ễ 1EC4 ễ 1EC5 Ệ 1EC6 ệ 1EC7 Ỉ 1EC8 ỉ 1EC9 Ị 1ECA ị 1ECB Ọ 1ECC ọ 1ECD Ỏ 1ECE ỏ 1ECF Ố 1ED0 ố 1ED1 Ồ 1ED2 ồ 1ED3 Ổ 1ED4 ổ 1ED5 Ỗ 1ED6 ỗ 1ED7 Ộ 1ED8 ộ 1ED9 Ớ 1EDA ớ 1EDB Ờ 1EDC ờ 1EDD Ở 1EDE ở 1EDF Ỡ 1EE0 ỡ 1EE1 Ợ 1EE2 ợ 1EE3 Ụ 1EE4 ụ 1EE5 Ủ 1EE6 ủ 1EE7 Ứ 1EE8 ứ 1EE9 Ừ 1EEA ừ 1EEB Ử 1EEC ử 1EED Ữ 1EEE ữ 1EEF Ự 1EF0 ự 1EF1 Ỳ 1EF2 ỳ 1EF3 Ỵ 1EF4 ỵ 1EF5 Ỷ 1EF6 ỷ 1EF7 Ỹ 1EF8 ỹ

gravydevsupreme commented 3 years ago

This task involved generating a Font Asset and putting it into an Asset Bundle.

There's no one size fits all here, because how to do this differs based on what version of TextMesh Pro is used and what version of the Unity Engine is used. But in later versions (2018+) it is fairly simple.

For 2018+, do the following:

  1. Download the Unity Editor and install the specific version of the Unity Engine that the game uses.
  2. Create a new project using that version (if asked during project creation whether you want to include TextMesh Pro, say yes)
  3. Once the project is created use the TextMesh Pro tooling to create a Font Asset. This may require installing additional packages to the project or they may already be included. It differs.
  4. Once a Font Asset has been create you must create an Asset Bundle. How this is created also differs from version to version.
  5. Put the Asset Bundle into the game directory and reference it from the AutoTranslatorConfig.ini file as described in the README of this repository.

For step (1,2,3) and step (4) you should be able to find some guides floating around online on how to do this. Here's an example for Asset Bundles used by the Raft community. In this example they actually describe an "old" way of creating asset bundles, but that should still work just fine.

There's some additional information about how I have created asset bundles in the past in this issue.

In the Releases tab of this repository there is a file called TMP_Font_AssetBundles.zip that contains a few different Asset Bundles with a single Font Asset that was created for different versions of the Unity Engine. They might work for you, but they may also simply fail to load because of incompatibility.

I know this is described in very broad terms, but there is no one-size-fits-all answer to this question.

nonamebatbai commented 3 years ago

This task involved generating a Font Asset and putting it into an Asset Bundle.

  • The Font Asset should be generated using the same version of TextMesh Pro that the game uses.
  • The Asset Bundle should be generated using the same version of the Unity Engine as the game uses.

There's no one size fits all here, because how to do this differs based on what version of TextMesh Pro is used and what version of the Unity Engine is used. But in later versions (2018+) it is fairly simple.

For 2018+, do the following:

  1. Download the Unity Editor and install the specific version of the Unity Engine that the game uses.
  2. Create a new project using that version (if asked during project creation whether you want to include TextMesh Pro, say yes)
  3. Once the project is created use the TextMesh Pro tooling to create a Font Asset. This may require installing additional packages to the project or they may already be included. It differs.
  4. Once a Font Asset has been create you must create an Asset Bundle. How this is created also differs from version to version.
  5. Put the Asset Bundle into the game directory and reference it from the AutoTranslatorConfig.ini file as described in the README of this repository.

For step (1,2,3) and step (4) you should be able to find some guides floating around online on how to do this. Here's an example for Asset Bundles used by the Raft community. In this example they actually describe an "old" way of creating asset bundles, but that should still work just fine.

There's some additional information about how I have created asset bundles in the past in this issue.

In the Releases tab of this repository there is a file called TMP_Font_AssetBundles.zip that contains a few different Asset Bundles with a single Font Asset that was created for different versions of the Unity Engine. They might work for you, but they may also simply fail to load because of incompatibility.

I know this is described in very broad terms, but there is no one-size-fits-all answer to this question.

I play empire of sin game. all your fonts work. but your fonts are missing the above letters to display in the game. I don't know how to create a new font, even though I've seen the tutorial. Can you help me add the missing letters to the font ?

gravydevsupreme commented 3 years ago

You can try this, but I will say this: I do not remember which version of TextMesh Pro I used when I generated those bundles, and this is definitely not generated using the same version because the size of the file is actually smaller.

https://www.mediafire.com/file/pl7ezsfqylax662/arialuni_sdf_u2019/file

gravydevsupreme commented 3 years ago

Some guidance on how to generate it for Unity Engine 2018 or greater when the game uses the Unity.TextMeshPro.dll file:

  1. Create a new Unity Project with the desired version.
  2. Use the Package Manager to ensure that TextMesh Pro and Asset Bundler Browser is installed. Note that you can install different versions of TMP and you may need to do some digging to determine which version is right for your game.

Windows

PackageManagerUI

  1. Locate Arial Unicode MS Regular in C:\Windows\Fonts and drag it into project. If you do not have it, find it somewhere online.

LocatingArialUni

  1. Create a TextMesh Pro font asset. You may need to "Import TMP Essential Resources" first. ALSO: Creating the font asset will take a while and the progress bar will not progress at all for a long time. Especially if using shown settings.

CreatingTMPFont

  1. Create the Asset Bundle. Drag the TextMesh Pro Font Asset into the Asset Bundle Explorer and configure as shown (avoid using LZMA for best compatibility). Then click Build.

AssetBundleCreation

AssetBundleBuilding

  1. This will generate the following file, which is the file I have renamed and redistributed:

TextMeshProAssetBundle

nonamebatbai commented 3 years ago

You can try this, but I will say this: I do not remember which version of TextMesh Pro I used when I generated those bundles, and this is definitely not generated using the same version because the size of the file is actually smaller.

https://www.mediafire.com/file/pl7ezsfqylax662/arialuni_sdf_u2019/file

it works . thank you very much

baoenzo commented 3 years ago

@nonamebatbai Can you give me sdf fonts with Vietnamese characters ?

nonamebatbai commented 3 years ago

@nonamebatbai Can you give me sdf fonts with Vietnamese characters ?

ok. trao đổi qua discord nguyễn đình đức#3035 . discord gametiengviet tôi tìm bác mà không thấy

Mirra0510 commented 7 months ago

@nonamebatbai Ông ơi, ông còn giữ font này không, cho tôi xin với?