Bug 104622 - Add duplicate node entry to elements in emoji.json database
Summary: Add duplicate node entry to elements in emoji.json database
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.3.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Gaurav Dhingra
URL:
Whiteboard: target:5.4.0 target:5.3.0.2
Keywords: difficultyBeginner, easyHack, topicCleanup, topicUI
Depends on:
Blocks:
 
Reported: 2016-12-13 01:18 UTC by Akshay Deep
Modified: 2016-12-31 10:13 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Akshay Deep 2016-12-13 01:18:52 UTC
In the file sfx2/emojiconfig/emoji.json (http://opengrok.libreoffice.org/xref/core/sfx2/emojiconfig/emoji.json), there are certain entries which representes an emoji but with different color(skin tone). The task is to find such emojis and add a boolean field such as:

"duplicate" : true

Add these entries to all the emoji nodes which represents same emoji with different tone. Leave the first instance as it is, i.e. if there are 5 tones of an emoji, add duplicate field on all instances except the first instance.

    "angel_tone1" <--{No need to add boolean field}
    "angel_tone2" <--add boolean field
    "angel_tone3" <--add boolean field
    "angel_tone4" <--add boolean field
    "angel_tone5" <--add boolean field

Reason: Emojis are rendered using font glyphs. We don’t support fonts with SVG table on Linux or Mac. Fonts with SVG tables are so far only supported on Windows 10 with anniversary update. "EmojiOne" font which is used in the Emoji toolbar control provides for black and white fallback glyphs, which leaves different tones of emoji appear same.
Comment 1 Akshay Deep 2016-12-13 11:07:06 UTC
After completing the modifications in the emoji database, assignee should parse the json for this entry as done here:

http://opengrok.libreoffice.org/xref/core/sfx2/source/control/emojiview.cxx#137

by adding a condition to check duplicates. The emoji should not be added to the toolbar if it's a duplicate.
Comment 2 Commit Notification 2016-12-19 18:24:33 UTC
Gaurav Dhingra committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9fa5439cb6aa695ca2e3fefd4426bdd150091cbe

tdf#104622 Add duplicate node entry to elements in emoji.json database

It will be available in 5.4.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 3 Commit Notification 2016-12-31 10:13:59 UTC
Gaurav Dhingra committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1717f766c86b6866704067aeecfa3cc0ac6d78af&h=libreoffice-5-3

tdf#104622 Add duplicate node entry to elements in emoji.json database

It will be available in 5.3.0.2.

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

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