1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:58:12 +00:00

LibUnicode: Parse and generate custom emoji added for SerenityOS

Parse emoji from emoji-serenity.txt to allow displaying their names and
grouping them together in the EmojiInputDialog.

This also adds an "Unknown" value to the EmojiGroup enum. This will be
useful for emoji that aren't found in the UCD, or for when UCD downloads
are disabled.
This commit is contained in:
Timothy Flynn 2022-09-09 09:51:03 -04:00 committed by Linus Groh
parent 0aadd4869d
commit b7ef36aa36
3 changed files with 72 additions and 2 deletions

View file

@ -63,6 +63,7 @@ set(EMOJI_TEST_URL "https://unicode.org/Public/emoji/${EMOJI_VERSION}/emoji-test
set(EMOJI_TEST_PATH "${UCD_PATH}/emoji-test.txt")
set(EMOJI_GENERATOR_PATH "${SerenityOS_SOURCE_DIR}/Meta/generate-emoji-txt.sh")
set(EMOJI_RES_PATH "${SerenityOS_SOURCE_DIR}/Base/res/emoji")
set(EMOJI_SERENITY_PATH "${SerenityOS_SOURCE_DIR}/Base/home/anon/Documents/emoji-serenity.txt")
set(EMOJI_INSTALL_PATH "${CMAKE_BINARY_DIR}/Root/home/anon/Documents/emoji.txt")
if (ENABLE_UNICODE_DATABASE_DOWNLOAD)
@ -123,7 +124,7 @@ if (ENABLE_UNICODE_DATABASE_DOWNLOAD)
"${UNICODE_META_TARGET_PREFIX}"
"${EMOJI_DATA_HEADER}"
"${EMOJI_DATA_IMPLEMENTATION}"
arguments -e "${EMOJI_TEST_PATH}"
arguments -e "${EMOJI_TEST_PATH}" -s "${EMOJI_SERENITY_PATH}"
)
if (CMAKE_CURRENT_BINARY_DIR MATCHES ".*/LibUnicode") # Serenity build.