Bug 1648281

Summary: [libreoffice][fix available] Junk character gets added when some emojis are inserted.
Product: Red Hat Enterprise Linux 8 Reporter: Bhushan Barve <bbarve>
Component: libreofficeAssignee: Caolan McNamara <caolanm>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: bsanford
Target Milestone: rc   
Target Release: 8.0   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libreoffice-6.0.6.1-20.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-28 15:37:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
backport of render + various ibus and fontconfig tweaks to get it all to work none

Description Bhushan Barve 2018-11-09 10:19:20 UTC
Description of problem: Tried entering emojis in libreoffice applications. When user tries to enter an emoji, some garbage character gets added in case of some. Also sometimes, some emojis get added twice. Please refer attached screenshot.


Version-Release number of selected component (if applicable):
libreoffice-core-6.0.6.1-9.el8.x86_64
[test@localhost ~]$ cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.0 Beta (Ootpa) - beta 1.3 build.

How reproducible:
always

Steps to Reproduce:
1. launch oowriter
2. press ctrl-shift-e followed by keyword, for e.g. boy
3. hit space twice 
4. hit enter

Actual results:
some garbage characters get added with emoji.

Expected results:
There should not be any garbage character or double insertion of emoji.

Additional info:

Comment 1 Caolan McNamara 2018-11-09 11:21:49 UTC
If I do it in gedit, and cut and paste "👦🏻" from there to writer it happens too, so its not any problem with the input method. Seems there really are two chars there, Unicode Character 'BOY' (U+1F466) followed by Unicode Character 'EMOJI MODIFIER FITZPATRICK TYPE-1-2' (U+1F3FB) so its on the render side of things

Comment 2 Caolan McNamara 2018-11-09 12:30:55 UTC
If I erase all emoji fonts except for Symbola, then I get the same bustage in gedit as well as LibreOffice, so a key problem seems to be font selection

Comment 3 Caolan McNamara 2018-11-14 11:28:29 UTC
The key font we want to use is a non-outline font so is rejected by LibreOffice as a candidate, so we'd have to relax that restriction and tweak things to bubble the font down to our cairo renderer. The good news is that if we can get it there, then it seems to render fine

Comment 5 Caolan McNamara 2019-09-04 19:20:59 UTC
Created attachment 1611638 [details]
backport of render + various ibus and fontconfig tweaks to get it all to work

Comment 7 Bill Sanford 2019-12-12 13:32:39 UTC
In the OP steps, I couldn't use CTRL-SHIFT-e, but I did use :<emoji name>: and as soon as I entered the second colon, I got the emoji and tried to reproduce the bug. I used writer 6.0.6.1-20 and it looks like it is fixed.

Comment 9 errata-xmlrpc 2020-04-28 15:37:33 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:1598