Unexpected behaviour when typing Emojis in RTL paragraph

Hi,
I am trying to type in Emojis in Writer document, in a right-to-left paragraph. But all I get is some unidentified sign.
When the paragraph is set to left-to-right it appears as it should.
My document is in Hebrew but the problem occur on English as well.

Attached is a MWE + screenshot of the output.
Any suggestions?


libreoffice_issue.odt (9.4 KB)

You didn’t mention LO version, nor if you activated Tools>Options, Languages Settings>Languages Complex Text Layout.

This is not a definitive answer but you seem to have forced RTL over an English sequence (which is LTR) and this perhaps conflicted with internal text processing. If I type another English letter after the emoji (i.e. at left of it), the test is rarranged and the emoji correctly displays.

It looks like forcing RTL over the emoji results in a tentative font selection for something Hebrew-specific. When the whole sequence becomes LTR (with the added letter), the adequate font is chosen.

This happens independently of the choice of the Hebrew font in Format>Character. It is Free Sans in the sample file but even when forced to Liberation Serif, the same behaviour is observed.

My advice is then to let Writer handle the various scripts (Western and Hebrew) by itself without trying to interfere. Also, in your real document, use styles instead of direct formatting. This is mire rigorous and avoids many problems.

Thanks for the advice but the problem persists.
My LibreOffice version is 7.4.5.1, and CTL is turned on with Hebrew.

The emoji indeed appears correctly when adding an English character after it. But it doesn’t work when using Hebrew. See the attached example. I added a sentence in Hebrew, and the emoji doesn’t appear correctly.

Is it a bug?
libreoffice_issue.odt (9.8 KB)

I can’t find any explanation nor workaround. I tried to force a character style over it to no effect.
I suspect it is a matter of font substitution. Emojis are not present in usual fonts. Writer or Harfbuzz (the font renderer) will try to find an adequate font containing the emoji. In some of my attempts, I got something looking like the “missing glyph”.
File a bug report. This is the simplest way to trigger developers’ collaboration.

I haven’t installed the font FreeSans it shows it is used, but are you sure the emoji you used is in this font? It seems there isn’t the emoji in used font and the “system for font substitution” is “confused” from RTL and probably no existing emoji character in used font.

I will file a bug report.
Thanks for your efforts!

As far as I understand, the font is not the issue.

  1. The same font shows the emoji correctly when changing to LTR (in the English sentence).
  2. The problem exists in other fonts too, e.g. Arial.

There is some mechanism in Operating System to substitute the characters that aren’t in used fonts. And it seems this mechanism is “confused” from your RTL Hebrew and no-existing character.
It is not advisable to insert characters that are not in the font, because the substitutions for non-existing characters are not completely reliable.