Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eviltwo/systemfontlocalization
Auto generate fallback font asset by system font (OS font) in runtime.
https://github.com/eviltwo/systemfontlocalization
font localization text-mesh-pro tools unity upm upm-package
Last synced: 4 months ago
JSON representation
Auto generate fallback font asset by system font (OS font) in runtime.
- Host: GitHub
- URL: https://github.com/eviltwo/systemfontlocalization
- Owner: eviltwo
- License: mit
- Created: 2024-02-20T16:45:35.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-08-22T05:06:29.000Z (6 months ago)
- Last Synced: 2024-09-27T23:23:56.231Z (4 months ago)
- Topics: font, localization, text-mesh-pro, tools, unity, upm, upm-package
- Language: C#
- Homepage:
- Size: 1.37 MB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# SystemFontLocalization
Auto generate fallback font asset by system font in runtime.
![SystemFont](https://github.com/eviltwo/SystemFontLocalization/assets/7721151/8e203dbf-ea21-445d-a4d9-b8484028bf6d)# Dependency
When you import SystemFontLocalization with UPM, these packages are automatically imported.
- Text Mesh Pro `com.unity.textmeshpro 3.2.0-pre.6`
- Required 3.2.0-pre.6 for function `TMP_FontAsset.CreateFontAsset(fontPath)`
- Localization `com.unity.localization`# Install with UPM
```
https://github.com/eviltwo/SystemFontLocalization.git?path=src/SystemFontLocalization/Assets/SystemFontLocalization
```# Getting started
- Localize the text using the [Localization package](https://docs.unity3d.com/Packages/[email protected]).
- Create empty GameObject and attach SystemFontReplacer component to it.
- Set font asset and font name list in SystemFontReplacer component.
- When you play the game, the font assets will be swapped to match the localization language.# Recommend settings
- Use static fonts. Dynamic fonts cause diffs on git every time you build.
- Set the default language to "en".
- Set the base font asset to "Static".
- Generate a Font atlas with the character set set to "ASCII".
- Disable "kern" in text. Prevents the problem of Cyrillic characters being line breaks.
- Setup default TextMeshPro settings in ProjectSettings.