Skip to content

Instantly share code, notes, and snippets.

@wearhere
Created May 28, 2020 09:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wearhere/ac1b03f64224c035b51c5b4b473b9aec to your computer and use it in GitHub Desktop.
Save wearhere/ac1b03f64224c035b51c5b4b473b9aec to your computer and use it in GitHub Desktop.
Trying to figure out how to apply skin tone modifiers to gemoji
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