XUnity.AutoTranslator
XUnity.AutoTranslator copied to clipboard
OverrideFont always fail
- Error content
Failed to update dynamic font (Arial) texture; all the needed characters do not fit onto a single texture (max size 4096). Try using less text or a smaller font size.
- Environment
- Windows 10 2004 64bit
- Game: Alice Gear Aegis 1.32.2 (DMM games) with BepIn 5.3.0.0
- Config:
[Service]
Endpoint=GoogleTranslate
[General]
Language=ko
FromLanguage=ja
[Behaviour]
...
OverrideFont=Arial
...
(All others are default settings)
- What i tried
- Tried fonts with smaller subsets:
- I get the same error and it doesn't work
- Note
- Korean, which is the target of translation, is a language with a very large subset, so it seems that there is a problem with creating a single texture
- Arial, which is the system default font, and even a font that has been reduced in size as much as possible cannot be applied. I want to ask for help
Interesting issue. Not seen it before, but it is probably because the size of the font in the generated texture is too large.
I tried adding an option to directly control the generated font size and that allows it to be generated. Although then it has different issues:
- Fonts are the wrong size (they need to be upscaled, probably, which is gonna cause quality issues)
- You would need to guess a font size that the game can use when generating the font.
- At some font sizes it seems text simply does not appear.
If you're interested in experimenting a bit you can try this version. It adds a new config option OverrideFontSize, an integer. You can try out different values of it to see if it works. I generally found that too small values causes the text to be very small and too large values cause the text to simply disappear. (I generally tried in the range 10-50).
same issue , but only happend in battle scene
[Warning: Unity Log] Font size and style overrides are only supported for dynamic fonts. [Error : Unity Log] Failed to update dynamic font (Microsoft JhengHei UI) texture; all the needed characters do not fit onto a single texture (max size 4096). Try using less text or a smaller font size.
I Translate simplified chinese to traditional chinese , use custom Translator works fine but when I enter battle scene of the game , the error message spam the log and game is freeze
also try OverrideFontSize from 2 ~ 10 , still same