| 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] (ORCID: <https://orcid.org/0000-0002-6485-8781>), Claus Thorn Ekstrøm [ctb] |
| Maintainer: | Guangchuang Yu <[email protected]> |
| License: | Artistic-2.0 |
| Version: | 0.6.0 |
| Built: | 2026-05-28 10:25:17 UTC |
| Source: | https://github.com/guangchuangyu/emojifont |
convert emoji aliases to unicode
emoji(aliases)emoji(aliases)
aliases |
aliases |
unicode
Guangchuang Yu
emoji('love_letter')emoji('love_letter')
convert fontawesome aliases to text
fontawesome(aliases)fontawesome(aliases)
aliases |
aliases |
text
ygc
fontawesome('fa-twitter')fontawesome('fa-twitter')
wrapper layer for visualizing emoji
geom_emoji( alias = "rose", color = "#67001f", size = 120, x = 1, y = 1, vjust = 0.25, ... )geom_emoji( alias = "rose", color = "#67001f", size = 120, x = 1, y = 1, vjust = 0.25, ... )
alias |
emoji alias |
color |
color |
size |
size |
x |
x positionsym |
y |
y position |
vjust |
vertical adjustment |
... |
additional parameter for geom_text |
ggplot2 layer
Guangchuang Yu
wrapper layer for visualizing fontawesome
geom_fontawesome( alias = "fa-github", color = "#67001f", size = 120, x = 1, y = 1, ... )geom_fontawesome( alias = "fa-github", color = "#67001f", size = 120, x = 1, y = 1, ... )
alias |
fontawesome alias |
color |
color |
size |
size |
x |
x position |
y |
y position |
... |
additional parameter for geom_text |
ggplot2 layer
Guangchuang Yu
list emoji fonts
list.emojifonts()list.emojifonts()
emoji font files
ygc
load emoji font
load.emojifont(font = NULL)load.emojifont(font = NULL)
font |
one of output from list.emojifonts |
ygc
load fontawesome
load.fontawesome(font = "fontawesome-webfont.ttf")load.fontawesome(font = "fontawesome-webfont.ttf")
font |
font |
ygc
random emoji
sample_emoji(size, replace = FALSE)sample_emoji(size, replace = FALSE)
size |
a non-negative integer giving the number of items to choose |
replace |
Should sampling be with replacement? |
random emoji
Guangchuang Yu
sample_emoji(3)sample_emoji(3)
random fontawesome
sample_fontawesome(size, replace = FALSE)sample_fontawesome(size, replace = FALSE)
size |
a non-negative integer giving the number of items to choose |
replace |
Should sampling be with replacement? |
random fontawesome
Guangchuang Yu
sample_fontawesome(3)sample_fontawesome(3)
search emoji
search_emoji(str, type = "aliases", approximate = FALSE)search_emoji(str, type = "aliases", approximate = FALSE)
str |
string text |
type |
one of 'aliases', 'description' and 'tags' |
approximate |
logical |
corresponding aliases, can be used to get unicode by emoji function
ygc
search fontawesome
search_fontawesome(str, approximate = FALSE)search_fontawesome(str, approximate = FALSE)
str |
string text |
approximate |
logical |
corresponding aliases
ygc