Add support for more emoji.

This commit is contained in:
John Preston 2018-09-28 15:02:29 +03:00
parent 979db97859
commit d5ec85c1d8
4 changed files with 2222 additions and 290 deletions

File diff suppressed because it is too large Load Diff

View File

@ -10,6 +10,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <QtCore/QString>
#include <QtCore/QStringList>
#ifdef __APPLE__
#define SUPPORT_IMAGE_GENERATION
#endif // __APPLE__
namespace codegen {
namespace emoji {

View File

@ -107,7 +107,7 @@ QString ComposeString(const std::initializer_list<QChar> &chars) {
return result;
}
const auto NotSupported = ([] {
const auto NotSupported = [] {
auto result = QSet<QString>();
auto insert = [&result](auto... args) {
result.insert(ComposeString({ args... }));
@ -123,97 +123,12 @@ const auto NotSupported = ([] {
for (auto i = 0; i != 26; ++i) {
insert(0xD83C, 0xDDE6 + i); // :regional_indicator_a: ... :regional_indicator_z:
}
insert(0xD83C, 0xDDFA, 0xD83C, 0xDDF3); // :united_nations:
insert(0xD83C, 0xDFF4, 0xDB40, 0xDC67, 0xDB40, 0xDC62, 0xDB40, 0xDC65, 0xDB40, 0xDC6E, 0xDB40, 0xDC67, 0xDB40, 0xDC7F); // :england:
insert(0xD83C, 0xDFF4, 0xDB40, 0xDC67, 0xDB40, 0xDC62, 0xDB40, 0xDC73, 0xDB40, 0xDC63, 0xDB40, 0xDC74, 0xDB40, 0xDC7F); // :scotland:
insert(0xD83C, 0xDFF4, 0xDB40, 0xDC67, 0xDB40, 0xDC62, 0xDB40, 0xDC77, 0xDB40, 0xDC6C, 0xDB40, 0xDC73, 0xDB40, 0xDC7F); // :wales:
insert(0xD83D, 0xDEF7); // :sled:
insert(0xD83D, 0xDEF8); // :flying_saucer:
insert(0xD83E, 0xDD1F); // :love_you_gesture:
insert(0xD83E, 0xDD28); // :face_with_raised_eyebrow:
insert(0xD83E, 0xDD29); // :star_struck:
insert(0xD83E, 0xDD2A); // :crazy_face:
insert(0xD83E, 0xDD2B); // :shushing_face:
insert(0xD83E, 0xDD2C); // :face_with_symbols_over_mouth:
insert(0xD83E, 0xDD2D); // :face_with_hand_over_mouth:
insert(0xD83E, 0xDD2E); // :face_vomiting:
insert(0xD83E, 0xDD2F); // :exploding_head:
insert(0xD83E, 0xDD31); // :breast_feeding:
insert(0xD83E, 0xDD32); // :palms_up_together:
insert(0xD83E, 0xDD4C); // :curling_stone:
insert(0xD83E, 0xDD5F); // :dumpling:
insert(0xD83E, 0xDD60); // :fortune_cookie:
insert(0xD83E, 0xDD61); // :takeout_box:
insert(0xD83E, 0xDD62); // :chopsticks:
insert(0xD83E, 0xDD63); // :bowl_with_spoon:
insert(0xD83E, 0xDD64); // :cup_with_straw:
insert(0xD83E, 0xDD65); // :coconut:
insert(0xD83E, 0xDD66); // :broccoli:
insert(0xD83E, 0xDD67); // :pie:
insert(0xD83E, 0xDD68); // :pretzel:
insert(0xD83E, 0xDD69); // :cut_of_meat:
insert(0xD83E, 0xDD6A); // :sandwich:
insert(0xD83E, 0xDD6B); // :canned_food:
insert(0xD83E, 0xDD92); // :giraffe:
insert(0xD83E, 0xDD93); // :zebra:
insert(0xD83E, 0xDD94); // :hedgehog:
insert(0xD83E, 0xDD95); // :sauropod:
insert(0xD83E, 0xDD96); // :t_rex:
insert(0xD83E, 0xDD97); // :cricket:
insert(0xD83E, 0xDDD0); // :face_with_monocle:
insert(0xD83E, 0xDDD1); // :adult:
insert(0xD83E, 0xDDD2); // :child:
insert(0xD83E, 0xDDD3); // :older_adult:
insert(0xD83E, 0xDDD4); // :bearded_person:
insert(0xD83E, 0xDDD5); // :woman_with_headscarf:
insert(0xD83E, 0xDDD6); // :person_in_steamy_room:
insert(0xD83E, 0xDDD6, 0x200D, 0x2640, 0xFE0F); // :woman_in_steamy_room:
insert(0xD83E, 0xDDD6, 0x200D, 0x2642, 0xFE0F); // :man_in_steamy_room:
insert(0xD83E, 0xDDD7); // :person_climbing:
insert(0xD83E, 0xDDD7, 0x200D, 0x2640, 0xFE0F); // :woman_climbing:
insert(0xD83E, 0xDDD7, 0x200D, 0x2642, 0xFE0F); // :man_climbing:
insert(0xD83E, 0xDDD8); // :person_in_lotus_position:
insert(0xD83E, 0xDDD8, 0x200D, 0x2640, 0xFE0F); // :woman_in_lotus_position:
insert(0xD83E, 0xDDD8, 0x200D, 0x2642, 0xFE0F); // :man_in_lotus_position:
insert(0xD83E, 0xDDD9); // :mage:
insert(0xD83E, 0xDDD9, 0x200D, 0x2640, 0xFE0F); // :woman_mage:
insert(0xD83E, 0xDDD9, 0x200D, 0x2642, 0xFE0F); // :man_mage:
insert(0xD83E, 0xDDDA); // :fairy:
insert(0xD83E, 0xDDDA, 0x200D, 0x2640, 0xFE0F); // :woman_fairy:
insert(0xD83E, 0xDDDA, 0x200D, 0x2642, 0xFE0F); // :man_fairy:
insert(0xD83E, 0xDDDB); // :vampire:
insert(0xD83E, 0xDDDB, 0x200D, 0x2640, 0xFE0F); // :woman_vampire:
insert(0xD83E, 0xDDDB, 0x200D, 0x2642, 0xFE0F); // :man_vampire:
insert(0xD83E, 0xDDDC); // :merperson:
insert(0xD83E, 0xDDDC, 0x200D, 0x2640, 0xFE0F); // :mermaid:
insert(0xD83E, 0xDDDC, 0x200D, 0x2642, 0xFE0F); // :merman:
insert(0xD83E, 0xDDDD); // :elf:
insert(0xD83E, 0xDDDD, 0x200D, 0x2640, 0xFE0F); // :woman_elf:
insert(0xD83E, 0xDDDD, 0x200D, 0x2642, 0xFE0F); // :man_elf:
insert(0xD83E, 0xDDDE); // :genie:
insert(0xD83E, 0xDDDE, 0x200D, 0x2640, 0xFE0F); // :woman_genie:
insert(0xD83E, 0xDDDE, 0x200D, 0x2642, 0xFE0F); // :man_genie:
insert(0xD83E, 0xDDDF); // :zombie:
insert(0xD83E, 0xDDDF, 0x200D, 0x2640, 0xFE0F); // :woman_zombie:
insert(0xD83E, 0xDDDF, 0x200D, 0x2642, 0xFE0F); // :man_zombie:
insert(0xD83E, 0xDDE0); // :brain:
insert(0xD83E, 0xDDE1); // :orange_heart:
insert(0xD83E, 0xDDE2); // :billed_cap:
insert(0xD83E, 0xDDE3); // :scarf:
insert(0xD83E, 0xDDE4); // :gloves:
insert(0xD83E, 0xDDE5); // :coat:
insert(0xD83E, 0xDDE6); // :socks:
insert(0x23CF, 0xFE0F); // :eject:
insert(0x2640, 0xFE0F); // :female_sign:
insert(0x2642, 0xFE0F); // :male_sign:
insert(0x2695, 0xFE0F); // :medical_symbol:
return result;
})();
}();
const auto ConvertMap = ([] {
auto result = QMap<QString, QString>();

View File

@ -62,6 +62,7 @@
'CLANG_CXX_LANGUAGE_STANDARD': 'c++1z',
'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES',
'GCC_OPTIMIZATION_LEVEL': '0',
'ALWAYS_SEARCH_USER_PATHS': 'NO',
},
'configurations': {