diff options
author | Tobias Markmann <tm@ayena.de> | 2017-02-24 10:45:47 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2017-02-24 10:45:47 (GMT) |
commit | ec9643bb6ebd8da74864969a16bffc7fa76431c4 (patch) | |
tree | 10dbb81850b453af44cccaf255b60a510445792d /BuildTools/EmojisGenerator | |
parent | 3861c418f95555a623d3e8005c75da9b9bbcd1e1 (diff) | |
download | swift-ec9643bb6ebd8da74864969a16bffc7fa76431c4.zip swift-ec9643bb6ebd8da74864969a16bffc7fa76431c4.tar.bz2 |
Remove ‘regional’ category from emoji dialog
Test-Information:
Build and ran on macOS 10.12.3 with Qt 5.7.1 and verified
the ‘regional’ category was gone from the dialog.
Change-Id: I664d5b8600037b42453c12ea0f180d0acd29361f
Diffstat (limited to 'BuildTools/EmojisGenerator')
-rw-r--r-- | BuildTools/EmojisGenerator/EmojiMapper.cpp | 2 | ||||
-rw-r--r-- | BuildTools/EmojisGenerator/generate.js | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/BuildTools/EmojisGenerator/EmojiMapper.cpp b/BuildTools/EmojisGenerator/EmojiMapper.cpp index be1c811..b93a191 100644 --- a/BuildTools/EmojisGenerator/EmojiMapper.cpp +++ b/BuildTools/EmojisGenerator/EmojiMapper.cpp @@ -69,8 +69,6 @@ namespace Swift { return shortnameToUnicode(":bulb:"); } else if (category == "symbols") { return shortnameToUnicode(":heavy_division_sign:"); - } else if (category == "regional") { - return shortnameToUnicode(":regional_indicator_a:"); } else if (category == "flags") { return shortnameToUnicode(":flag_white:"); } diff --git a/BuildTools/EmojisGenerator/generate.js b/BuildTools/EmojisGenerator/generate.js index 2b5541f..177e26e 100644 --- a/BuildTools/EmojisGenerator/generate.js +++ b/BuildTools/EmojisGenerator/generate.js @@ -25,7 +25,11 @@ var byteArrayToCStringLiteral = function (byteArray) { var mapping = ''; // Generate C++ mapping for shortnameUnicode_ -mapping += 'const std::unordered_map<std::string, std::string> EmojiMapper::shortnameUnicode = std::unordered_map<std::string, std::string>{' + _(emojis).filter(function(data) { +mapping += 'const std::unordered_map<std::string, std::string> EmojiMapper::shortnameUnicode = std::unordered_map<std::string, std::string>{'; +mapping += _(emojis).filter(function(data) { + // Filter out regional category. + return data.category != 'regional'; +}).filter(function(data) { // Only use emojis with 2 or less codepoints, as Qt's harfbuzz version // has issues rendering those as a single glyph. return data.unicode.split("-").length < 3; @@ -58,6 +62,9 @@ mapping += ' const std::unordered_map<std::string, std::string> EmojiMapper:: // Generate C++ mapping for categories var CategoryMapping = new Map(); _(emojis).filter(function(data) { + // Filter out regional category. + return data.category != 'regional'; +}).filter(function(data) { // Only use emojis with 2 or less codepoints, as Qt's harfbuzz version // has issues rendering those as a single glyph. return data.unicode.split("-").length < 3; |