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 |
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 position |
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 = "EmojiOne.ttf")
load.emojifont(font = "EmojiOne.ttf")
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