Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CDN ¶
type CDN struct {
// contains filtered or unexported fields
}
CDN provides an interface for a remote emoji dataset.
func (*CDN) DownloadEmojiInfo ¶
DownloadEmojiInfo retrieves and decodes a list of emoji metadata from the CDN.
func (*CDN) DownloadSpriteSheet ¶
DownloadSpriteSheet downloads the sprite sheet from the CDN.
type EmojiImageData ¶
type EmojiImageData struct { // A hyphen separated sequence of hex-encoded codepoints. // Includes zero-width-joiner character for multi code sequences. Unified string `json:"unified"` // Character is the actual emoji character consisting of one or more codepoints. // Not present in original input but will be populated by parser Character string `json:"character,omitempty"` // NonQualified is set if the emoji also has usage without a variation selector. NonQualified string `json:"non_qualified"` // Image is the image name as available via the CDN. Image string `json:"image"` // SheetX is the X index of the image in the sprite sheet. SheetX int `json:"sheet_x"` // SheetY is the Y index of the image in the sprite sheet. SheetY int `json:"sheet_y"` // Ignore legacy codepoint data // Docomo string `json:"docomo"` // AU string `json:"au"` // Softbank string `json:"softbank"` // Google string `json:"google"` AddedIn string `json:"added_in"` HasImgApple bool `json:"has_img_apple"` HasImgGoogle bool `json:"has_img_google"` HasImgTwitter bool `json:"has_img_twitter"` HasImgFacebook bool `json:"has_img_facebook"` Obsoletes string `json:"obsoletes"` ObsoletedBy string `json:"obsoleted_by"` }
EmojiImageData captures standard emoji attributes. These details are shared by both top-level emojis and variations.
type EmojiInfo ¶
type EmojiInfo struct { Name string `json:"name"` ShortName string `json:"short_name"` ShortNames []string `json:"short_names"` Text string `json:"text"` Texts []string `json:"texts"` Category string `json:"category"` SortOrder int `json:"sort_order"` EmojiImageData SkinVariations map[string]EmojiImageData `json:"skin_variations"` }
EmojiInfo captures standard emoji attributes for a named and tagged emoji.
type SpriteSheet ¶
type SpriteSheet struct {
// contains filtered or unexported fields
}
SpriteSheet represents the image data for a sprite sheet.
func NewSpriteSheet ¶
func NewSpriteSheet(reader io.Reader, width int) (*SpriteSheet, error)
NewSpriteSheet parses a PNG sprite of fixed-width sprites
Click to show internal directories.
Click to hide internal directories.