Closed WLongSAMA closed 3 months ago
Does chinese use a special space character? In your text I see that "," is a single character, compared to the english "," + " "
Does chinese use a special space character? In your text I see that "," is a single character, compared to the english "," + " "
In Chinese, generally space character is the same as in English, which is the same ascii character (\u0020), while "," and "," are two different characters (\uff0c and \u002c)
在中文里,空格字符通常与英文相同,都是同一个ascii字符(\u0020),而“,”与“,”这是两个不同的字符(\uff0c和\u002c)
I might have an idea as to what is going on. Mcd files use special bytes for some characters. For example for the space " ", ellipsis "…" and a couple others. So the space isn't actually considered a normal character. By default, I don't think it has any width. Instead, between each character there is a kerning (letter spacing) value, which can move 2 characters closer or further apart. For spaces that is usually +1, +5 or +36 pixels, depending on the font. But this only works for known letter combinations, like "e" + " " or "&" + " ".
I will have to add a default option for new fonts. In the meanwhile, I don't have a fix. If you want some kind of spacing, you either have to use english characters or hex edit the file (might not be worth it)
@ArthurHeitmann I seem to understand now, thank you for your help.
Sorry it took some time. It's fixed now in this new version https://github.com/ArthurHeitmann/F-SERVO/releases/tag/v1.4.4
If there are any other issues, let me know.
你好:
您开发的工具非常好用,但在使用中我发现了一个小错误。 当我尝试修改 ".mcd" 文件中的文本为中文的时候,会出现丢失空格字符的情况,当文本都是英文的时候就不会出现这个问题。
另外,这个工具似乎不能转换 NS 版的 ".wtp" 贴图,但我手动使用 python 脚本将贴图转换成 ".astc" 格式,再通过执行 “astcenc-avx2.exe” 可以得到正确的贴图,希望您可以将这个功能继续完善一下。
My English is not good, the following content comes from machine translation. If it's difficult to understand, I'm sorry.
Hello
The tool you developed is very useful, but I found a small error during use. When I try to modify the text in the ". mcd" file to Chinese, there is a loss of space characters, which does not occur when the text is all in English.
Additionally, it seems that this tool cannot convert the NS version of ". wtp" textures, but I manually used a Python script to convert the textures to ". astc" format, and then executed "astcenc avx2. exe" to obtain the correct textures. I hope you can continue to improve this feature.