Bug 153440 - Unexpected behavior when typing Emojis in RTL paragraph
Summary: Unexpected behavior when typing Emojis in RTL paragraph
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.5.1 release
Hardware: All All
: medium normal
Assignee: ⁨خالد حسني⁩
URL:
Whiteboard: target:7.6.0 target:7.5.5 target:24.2...
Keywords:
Depends on:
Blocks: Font-Substitution RTL
  Show dependency treegraph
 
Reported: 2023-02-07 14:57 UTC by idoh
Modified: 2024-08-03 09:15 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
MWE (9.81 KB, application/vnd.oasis.opendocument.text)
2023-02-07 14:57 UTC, idoh
Details
MWE output (73.52 KB, image/png)
2023-02-07 14:58 UTC, idoh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description idoh 2023-02-07 14:57:20 UTC
Description:
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 occurs in English as well.

LO version is 7.4.5.1 and CTL is activated with Hebrew

Steps to Reproduce:
1. Write some words in LTR mode.
2. Add the emoji 'Herb' (https://www.compart.com/en/unicode/U+1F33F).
3. Change the direction of the paragraph to RTL.

Actual Results:
The emoji is shown right in LTR. After changing to RTL it is not shown the way it should.

Expected Results:
The emoji should appear correctly regardless of the writing direction.


Reproducible: Always


User Profile Reset: No

Additional Info:


Attached is a MWE + screenshot of the output with the problem.
Comment 1 idoh 2023-02-07 14:57:52 UTC
Created attachment 185178 [details]
MWE
Comment 2 idoh 2023-02-07 14:58:20 UTC
Created attachment 185179 [details]
MWE output
Comment 3 ⁨خالد حسني⁩ 2023-02-08 07:23:28 UTC
For some reason font fallback is not working for the RTL paragraph, if you explicitly set the emoji to a font that have it, it will show fine.
Comment 4 idoh 2023-02-08 09:21:25 UTC
I confirm this workaround.                                                                 Explicitly changing the emoji's font to "Noto Color Emoji" makes it show OK.
Comment 5 Commit Notification 2023-06-01 12:46:51 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/737854f3c5131d3a64803edc0802dbbc07aa4405

tdf#153440: Fix font fallback for surrogate pairs in RTL text

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2023-06-01 15:34:16 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/0bf407836c4d10fe5cf54298c1978d9615a1a35c

tdf#153440: Fix font fallback for surrogate pairs in RTL text

It will be available in 7.5.5.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2023-06-13 20:44:59 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6b178c6e88ec5a765ad2b3ccd98182286222f550

tdf#153440: Add test

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2023-06-20 14:56:28 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/576349d137eb0bf8132f7b65f30cb9aa276e0b14

tdf#153440: Add test

It will be available in 7.6.0.0.beta2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.