Type: Package
Title: Emoji and Font Awesome in Graphics
Version: 0.6.0
Maintainer: Guangchuang Yu <guangchuangyu@gmail.com>
Description: An implementation of using emoji and fontawesome for using in both base and 'ggplot2' graphics.
Depends: R (≥ 3.5.0)
Imports: ggplot2, proto, showtext, sysfonts, utils, rlang
Suggests: knitr, quarto, yulab.utils
VignetteBuilder: quarto
License: Artistic-2.0
Encoding: UTF-8
URL: https://guangchuangyu.github.io/emojifont/
BugReports: https://github.com/GuangchuangYu/emojifont/issues
Packaged: 2026-02-27 03:36:16 UTC; HUAWEI
RoxygenNote: 7.3.3
NeedsCompilation: no
Author: Guangchuang Yu ORCID iD [aut, cre], Claus Thorn Ekstrøm [ctb]
Repository: CRAN
Date/Publication: 2026-02-27 06:30:20 UTC

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 positionsym

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 = NULL)

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