I was bored and randomly decided to look into this; I played around with the code file a little, and after a moment of epiphany I think I figured it out, actually. I still don't really know
why it happens (I have a theory, but I really don't know), but I'm pretty sure I know what happens.
So, it looks like the software treats 2 western characters as one character block (my theory is that japanese characters are done with 2 byte per character, while the latin alphabet only uses 1?). So what happens is that when you have the whitespace at the
end of a character block, it renders properly. But any (even multiple) whitespace at the
beginning of a block will be ignored by the software, for some reason.
So, e.g. the string "1 2 3 45 6 7 89 0", is turned into 1 |2 |3 |45| 6 |7 |89| 0
This then renders as "1 2 3 456 7 89". The space in front of the 6 is kicked out because it's at the beginning of the block (instead the block is then the "6 "). Similarly the space after the 9 is kicked out, and the 0 is not displayed, because it's only half a block.
Additional whitespaces are also ignored, so "1 23 4 5 " also turns into "1 234 5 ".
This is, I believe, also why sometimes a string cuts off one letter short. If the used string has an odd number of letters, the last letter will be swallowed by the program because it's only "half a block". This one can be fixed by adding a whitespace to the string, therefore "completing" the final block.
The solution I have found is probably not elegant, but it works. Effectively: After any word (word being a continuous string of characters between two whitespaces or a whitespace and the beginning/end of the string) with
odd letters, you have to put a space (even/especially if it's the last word in the string). After any word with
even letters, you instead put the japanese whitespace ( ). It's a bit wider than the regular space, so the word spacing is going to look a bit wobbly, but because it's a proper japanese character, it's worth a whole block and therefore "resets" the splitting of the sentence, so that the next block will begin with the first letter of the next word.
Note: this is also the issue why sometimes the program adds a weird @. if you
only use the japanese space symbol: if you place it after an odd word, you break the 2 bytes of the japanese character up into two blocks "hello world" becomes he|ll|o@|.w|or|ld.
Now, I don't actually speak japanese, so I couldn't translate it myself, but I added a proof-of-concept picture here regarding the possible final result. The english there is roughly taken Google Translate.
View attachment 1055667
Edit: And now I realized I missed the whole 3rd page where a bunch of other people already solved the issue. Now I feel bad.