::: spoiler problem
)(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO
:::
::: spoiler solution
)(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO )(-ELLO
:::
(hopefully those are wide enough to wrap for you)
There is a unicode character (U+2060 WORD JOINER) which instructs applications not to split two characters apart under any circumstances. I wrote a simple program to insert them into text automatically: https://codeberg.org/Mycellf/wordjoin
It only puts them where needed, thanks to icu_segmenter, a Rust library made by the Unicode Consortium: https://crates.io/crates/icu_segmenter
Let me know if you need any help compiling it/using a terminal.
3 Comments
Seigest@lemmy.ca · 1 pts · 54d
Not entirely up on the context of what you are trying to accomplish here. Are you making some kind of Pesterchum like quirk system that will work in Lemmy post?
jjj@lemmy.blahaj.zone · 1 pts · 53d
No, this is for an mspfa, etc. It works for text formatting in general, however, which is why I showed it over here.
It always bugged me that certain characters' words would get split at the end of the line, most frustratingly with Feferi/Meenah, since the )( and -E combinations get split right down the middle when wrapping. The program I wrote inserts word joiners )(, -E, and between any other combination of characters that are allowed to be split when wrapping, such as !a.
You can see it working in my mspfa here:
https://mspfa.com/?s=62374&p=34 (obligatory spoiler warning but if you haven't read the rest you'll probably forget about it after)
(in particular it prevents "You Highb!oods" from splitting after the "!")
Seigest@lemmy.ca · 1 pts · 53d
Ah thanks for the context. Though I am a bit clueless on mspfa hopefully someone will come along and know the answers.