Package 'emojifont'

Title: Emoji and Font Awesome in Graphics
Description: An implementation of using emoji and fontawesome for using in both base and 'ggplot2' graphics.
Authors: Guangchuang Yu [aut, cre] , Claus Thorn Ekstrøm [ctb]
Maintainer: Guangchuang Yu <[email protected]>
License: Artistic-2.0
Version: 0.5.4
Built: 2024-10-31 16:33:19 UTC
Source: https://github.com/guangchuangyu/emojifont

Help Index


emoji

Description

convert emoji aliases to unicode

Usage

emoji(aliases)

Arguments

aliases

aliases

Value

unicode

Author(s)

guangchuang yu

Examples

emoji('love_letter')

fontawesome

Description

convert fontawesome aliases to text

Usage

fontawesome(aliases)

Arguments

aliases

aliases

Value

text

Author(s)

ygc

Examples

fontawesome('fa-twitter')

geom_emoji

Description

wrapper layer for visualizing emoji

Usage

geom_emoji(
  alias = "rose",
  color = "#67001f",
  size = 120,
  x = 1,
  y = 1,
  vjust = 0.25,
  ...
)

Arguments

alias

emoji alias

color

color

size

size

x

x position

y

y position

vjust

vertical adjustment

...

additional parameter for geom_text

Value

ggplot2 layer

Author(s)

guangchuang yu


geom_fontawesome

Description

wrapper layer for visualizing fontawesome

Usage

geom_fontawesome(
  alias = "fa-github",
  color = "#67001f",
  size = 120,
  x = 1,
  y = 1,
  ...
)

Arguments

alias

fontawesome alias

color

color

size

size

x

x position

y

y position

...

additional parameter for geom_text

Value

ggplot2 layer

Author(s)

guangchuang yu


list.emojifonts

Description

list emoji fonts

Usage

list.emojifonts()

Value

emoji font files

Author(s)

ygc


load.emojifont

Description

load emoji font

Usage

load.emojifont(font = "EmojiOne.ttf")

Arguments

font

one of output from list.emojifonts

Author(s)

ygc


load.fontawesome

Description

load fontawesome

Usage

load.fontawesome(font = "fontawesome-webfont.ttf")

Arguments

font

font

Author(s)

ygc


sample_emoji

Description

random emoji

Usage

sample_emoji(size, replace = FALSE)

Arguments

size

a non-negative integer giving the number of items to choose

replace

Should sampling be with replacement?

Value

random emoji

Author(s)

guangchuang yu

Examples

sample_emoji(3)

sample_fontawesome

Description

random fontawesome

Usage

sample_fontawesome(size, replace = FALSE)

Arguments

size

a non-negative integer giving the number of items to choose

replace

Should sampling be with replacement?

Value

random fontawesome

Author(s)

guangchuang yu

Examples

sample_fontawesome(3)

search_emoji

Description

search emoji

Usage

search_emoji(str, type = "aliases", approximate = FALSE)

Arguments

str

string text

type

one of 'aliases', 'description' and 'tags'

approximate

logical

Value

corresponding aliases, can be used to get unicode by emoji function

Author(s)

ygc


search_fontawesome

Description

search fontawesome

Usage

search_fontawesome(str, approximate = FALSE)

Arguments

str

string text

approximate

logical

Value

corresponding aliases

Author(s)

ygc