Skip to content

Instantly share code, notes, and snippets.

@wearhere
wearhere / Playground.swift
Last active October 4, 2023 17:27
Apply skin tone modifiers to emojis per the Unicode spec.
import Foundation
import UIKit
import CoreText
// You can run this by copying this file into a Swift playground.
extension String {
// Returns the number of glyphs used to render the string. If this string
// should behave like a single emoji character (regardless of whether it is,