Giter VIP home page Giter VIP logo

unicode-emoji-json's Introduction

Unicode Emoji JSON Test status

This library provides a up-to-date version of emoji data from Unicode in JSON format, in a number of easily consumable file structures.

Check out muan/emojilib for emoji keyword pairings for extended searchability.

Details

RGI only

This data does not contain minimally-qualified and unqualified emoji.

RGI: Recommended for General Interchange. A subset of emojis which is likely to be widely supported across multiple platforms.

Minimally-qualified or unqualified emoji zwj sequences may be handled in the same way as their fully-qualified forms; the choice is up to the implementation.

Full description can be found at http://www.unicode.org/reports/tr51/.

Skin tone variations

Emoji's skin tone variations are consolidated into one base entry, with a skin_tone_support flag on them.

This means one entry of πŸ‘‹ represents its 5 variations– πŸ‘‹πŸ», πŸ‘‹πŸΌ, πŸ‘‹πŸ½, πŸ‘‹πŸΎ, πŸ‘‹πŸΏ; while raw unicode data list them as individual emoji entries.

Files

data-by-emoji.json:

{
  "πŸ˜€": {
    "name": "grinning face",
    "slug": "grinning_face",
    "group": "Smileys & Emotion",
    "emoji_version": "2.0",
    "unicode_version": "6.1",
    "skin_tone_support": false
  },
  ...
  "πŸ‘‹": {
    "name": "waving hand",
    "slug": "waving_hand",
    "group": "People & Body",
    "emoji_version": "2.0",
    "unicode_version": "6.0",
    "skin_tone_support": true,
    "skin_tone_support_unicode_version": "8.0"
  },
}

data-by-group.json:

{
  "Smileys & Emotion": [
    {
      "emoji": "πŸ˜€",
      "skin_tone_support": false,
      "name": "grinning face",
      "slug": "grinning_face",
      "unicode_version": "6.1",
      "emoji_version": "2.0"
    },
  ],
  ...
}

data-ordered-emoji.json:

[
  "πŸ˜€",
  "πŸ˜ƒ",
  ...
]

data-emoji-components.json:

{
  "light_skin_tone": "🏻",
  "medium_light_skin_tone": "🏼",
  ...
}

Development

  1. npm install

Install dependencies.

  1. npm run download

Download the latest data dump from unicode.org. Update the version variable in this file when a new version is available. Experiment with a version by passing an argument for version number: npm run download 13.0.

  1. npm run build

Parse and format the downloaded data into different files for distribution. This script also generates stats.json for use in test. Update the parser if the content format from unicode data has changed.

  1. npm test

Run test that ensures the build data matches the count of emoji parsed from the data source.

A common People's category test failure after an Emoji version upgrade might be that there are new dual skin tone emoji unaccounted for. Verify this by reading through the change log and see if there are any emoji that can be modified with two skin tone modifiers and add them to generate-emoji-counts.js then run npm run build which will update stats.json; then run the test again. This isn't automated currently. See #3.

Unicode License Agreement

https://www.unicode.org/license.html

unicode-emoji-json's People

Contributors

davebagler avatar dependabot[bot] avatar hugovk avatar louisgrasset avatar muan avatar nkalvi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

unicode-emoji-json's Issues

Women/men holding hands are not exposed as sequences

This is due to how the data exposes these sequences. See how people holding hands: light skin tone is made up by 7 code points, while woman and man holding hands: light skin tone has only 2 code points.

1F9D1 200D 1F91D 200D 1F9D1                ; fully-qualified     # πŸ§‘β€πŸ€β€πŸ§‘ E12.1 people holding hands
1F9D1 1F3FB 200D 1F91D 200D 1F9D1 1F3FB    ; fully-qualified     # πŸ§‘πŸ»β€πŸ€β€πŸ§‘πŸ» E12.1 people holding hands: light skin tone
1F9D1 1F3FB 200D 1F91D 200D 1F9D1 1F3FC    ; fully-qualified     # πŸ§‘πŸ»β€πŸ€β€πŸ§‘πŸΌ E12.1 people holding hands: light skin tone, medium-light skin tone
...
1F46D                                      ; fully-qualified     # πŸ‘­ E2.0 women holding hands
1F46D 1F3FB                                ; fully-qualified     # πŸ‘­πŸ» E12.1 women holding hands: light skin tone
1F469 1F3FB 200D 1F91D 200D 1F469 1F3FC    ; fully-qualified     # πŸ‘©πŸ»β€πŸ€β€πŸ‘©πŸΌ E12.1 women holding hands: light skin tone, medium-light skin tone
...
1F46B                                      ; fully-qualified     # πŸ‘« E2.0 woman and man holding hands
1F46B 1F3FB                                ; fully-qualified     # πŸ‘«πŸ» E12.1 woman and man holding hands: light skin tone
1F469 1F3FB 200D 1F91D 200D 1F468 1F3FC    ; fully-qualified     # πŸ‘©πŸ»β€πŸ€β€πŸ‘¨πŸΌ E12.1 woman and man holding hands: light skin tone, medium-light skin tone
...
1F46C                                      ; fully-qualified     # πŸ‘¬ E2.0 men holding hands
1F46C 1F3FB                                ; fully-qualified     # πŸ‘¬πŸ» E12.1 men holding hands: light skin tone
1F468 1F3FB 200D 1F91D 200D 1F468 1F3FC    ; fully-qualified     # πŸ‘¨πŸ»β€πŸ€β€πŸ‘¨πŸΌ E12.1 men holding hands: light skin tone, medium-light skin tone
...

It seems to me it'd be on the implementer of skin tone support to make sure πŸ‘­πŸ»(πŸ‘­,🏻) and πŸ‘©πŸ»β€πŸ€β€πŸ‘©πŸ»(πŸ‘©,🏻,‍,🀝,‍,πŸ‘©,🏻) are displayed the same, or know that when there are more than one skin tone options, do break them into sequences.

Test cases:

sequence Windows 10 iOS 13.2 Android 10.0
πŸ‘­(β’Έ) image image
πŸ‘©β€πŸ€β€πŸ‘©(ⒸⓏⒸⓏⒸ) image image (πŸ†–) (πŸ†–)
πŸ‘­πŸ»(β’Έβ€―πŸΏ) image
πŸ‘©πŸ»β€πŸ€β€πŸ‘©πŸ»(β’Έβ€―πŸΏβ“β’Έβ“β’Έβ€―πŸΏ) image (πŸ†–)
πŸ‘©πŸ»β€πŸ€β€πŸ‘©πŸΌ(β’Έβ€―πŸΏβ“β’Έβ“β’Έβ€―πŸΏ) image (πŸ†–)
πŸ‘©πŸΌβ€πŸ€β€πŸ‘©πŸ»(β’Έβ€―πŸΏβ“β’Έβ“β’Έβ€―πŸΏ) image

To summarize–

  • Windows supports all possible variations, including ones not listed in the Unicode list.
  • Apple supports variations listed in the Unicode list.
  • Android selectively support the minimum number of variations that can be made up by the skin tones, and orders matter. In the test case above, you can see that "light + medium light" doesn't work, but "medium light + light" works. (As this screenshot of the keyboard shows)

Potential fixes:

  1. πŸ€·β€β™€
{
  "πŸ‘­": {
    ..., 
    "sequence": "πŸ‘©β€πŸ€β€πŸ‘©", 
    "skin_tone_support": true
  }
}
  1. Showing sequence by default
{
  "πŸ‘­": {
    ..., 
    "name": "women_holding_hands",
    "skin_tone_support": true
  },
  "πŸ‘©β€πŸ€β€πŸ‘©": {
    ..., 
    "name": "women_holding_hands_sequence",
    "skin_tone_support": true
  }
}
  1. 😷
{
  "πŸ‘­": {
    ..., 
    "skin_tone_support": {
      "light": "πŸ‘­πŸ»", 
      "light_medium_light": "πŸ‘©πŸ»β€πŸ€β€πŸ‘©πŸΌ", 
      ...
    }
  }
}
  1. 🀒 (more than double the size of the JSON file)
{
  "πŸ‘­πŸ»": {...},
  "πŸ‘­πŸ»": {...},
  "πŸ‘©πŸ»β€πŸ€β€πŸ‘©πŸΌ": {...},
}

Incorrect names for squares/circles

I believe "red square" (πŸŸ₯) should be named "large red square" instead, as that's the official Unicode name. The same applies to the other colored squares and the circles as well.

Duplicate slug `keycap_` in `data-by-group.json`

Hey, thanks for this super useful list! I really appreciate the work you put into this ❀️

There appears to be one duplicate slug (keycap_) in the data-by-group.json. I'm not sure if this is intended or not (feel free to close if so):

"emoji": "#️⃣",
"skin_tone_support": false,
"name": "keycap #",
"slug": "keycap_",
"unicode_version": "0.6",
"emoji_version": "0.6"
},
{
"emoji": "*️⃣",
"skin_tone_support": false,
"name": "keycap *",
"slug": "keycap_",
"unicode_version": "2.0",
"emoji_version": "2.0"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.