Required go 1.16
or above; as embed is used.
go get https://github.com/olachat/goemojipic
to install
texts := goemojipic.SplitEmojiString("a 🥰 b")
// texts will a slice of EmojiString
// texts[0].Text == "a " texts[0].IsEmoji == false
// texts[1].Text == "🥰" texts[1].IsEmoji == true
// texts[2].Text == " b" texts[2].IsEmoji == false
imgData, err := goemojipic.GetApplePics("🥰")
// imgData: 72x72 png bytes from Apple's font
// err will not be nil if emoji not found
imgData, err := goemojipic.GetGooglePics("🥰")
// imgData: 72x72 png bytes from Google's font
// err will not be nil if emoji not found
- Apple & Google emoji images are extracted by
go run script/main.go
- emoji parsing using https://github.com/Andrew-M-C/go.emoji