What does Word Joiner exactly do?

Hello there, first-time poster here.

I’m currently working on a document in my native Polish and have to follow a customary rule of not ending lines with single-letter prepositions (a, o, i, u, z, w). MS Word has a rule in Polish dictionary not to do that and these words are automatically glued to following words and moved to following lines if needed. LibreOffice however does not do this automatically and most users in Poland use Non-breaking spaces in place of regular spaces between the preposition and the following word to make sure they appear within the same line.

The problem with Non-breaking spaces as implemented in LO Writer is they have constant width, which does not work with Justified text. The result is the first space of a line is quite narrow and all remaining are visibly wider. Not a huge deal, but this decreases the perceived neatness of the document.

I found the Word Joiner (under: Insert>Formatting marks>Word Joiner) to be a pretty well working fix for this issue. In a phrase “mieszkam w Polsce” where Polsce happens to break into the following line I would insert a Word Joiner after “w” but before the space, and in 99% of cases the “w” would move to the next line and keep the variable-long space, making it work nice in Justified paragraphs.

However, in 1% of cases it simply does not work. The only visible behaviour is the single-letter preposition moving a couple pixels to the left, but staying apart from the following word. I tried adding yet another Word Joiner after the space, so that the whole thing goes: [“w”][WJ][space][WJ][“Polsce”], but this did not work either.

The documentation for Word Joiner simply says:

Inserts an invisible space within a word that will keep the word together at the end of a line. Available when complex text layout (CTL) is enabled.

which to me does not really explain its exact behaviour or designed application. Therefore I turn to you, the community, to ask for help understanding and correctly applying Word Joiner. Or perhaps you have a different way of handling this problem without using Non-breaking spaces which unfortunately are not perfect for my application.

1 Like

I tried to use ZWJ U+200D (ZERO WIDTH JOINER) instead, but I get similar results. I’m afraid the problem comes from U+0020 SPACE itself. You could try to replace the ordinary space by one of the specialised spaces U+2000-U+200A but then though this could solve the single-letter word position, you wouldn’t get space auto-expansion with justification.