Created
May 28, 2020 09:45
-
-
Save wearhere/ac1b03f64224c035b51c5b4b473b9aec to your computer and use it in GitHub Desktop.
Trying to figure out how to apply skin tone modifiers to gemoji
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
// Each pair below is a "base" emoji copied from gemoji's emoji.json, | |
// followed by a modified emoji copied from OS X' "Emoji & Symbols" menu. | |
// You can run this by copying this file into a Swift playground. | |
// For readers' convenience, I've printed the output inline below. | |
// 1. | |
"ποΈ".unicodeScalars.forEach { (c) in | |
print(c.escaped(asASCII: true), terminator: "") | |
} | |
print("") // \u{0001F590}\u{FE0F} | |
"ππ»".unicodeScalars.forEach { (c) in | |
print(c.escaped(asASCII: true), terminator: "") | |
} | |
print("") // \u{0001F590}\u{0001F3FB} | |
// 2. | |
"πββοΈ".unicodeScalars.forEach { (c) in | |
print(c.escaped(asASCII: true), terminator: "") | |
} | |
print("") // \u{0001F486}\u{200D}\u{2642}\u{FE0F} | |
"ππ»ββοΈ".unicodeScalars.forEach { (c) in | |
print(c.escaped(asASCII: true), terminator: "") | |
} | |
print("") // \u{0001F486}\u{0001F3FB}\u{200D}\u{2642}\u{FE0F} | |
// 3. | |
"π΅οΈββοΈ".unicodeScalars.forEach { (c) in | |
print(c.escaped(asASCII: true), terminator: "") | |
} | |
print("") // \u{0001F575}\u{FE0F}\u{200D}\u{2642}\u{FE0F} | |
"π΅π»ββοΈ".unicodeScalars.forEach { (c) in | |
print(c.escaped(asASCII: true), terminator: "") | |
} | |
print("") // \u{0001F575}\u{0001F3FB}\u{200D}\u{2642}\u{FE0F} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment