diff options
author | Karl Berry <karl@freefriends.org> | 2021-04-19 21:25:21 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-04-19 21:25:21 +0000 |
commit | 3125499a8c2b497b0f964e23c53d9c9fe3fe4e58 (patch) | |
tree | 1618fa57d975d6d12cde15c8b1190c09061d033c /Master/texmf-dist/tex/optex/pkg/emoji.opm | |
parent | f5f0b7d1217bc7ab099302a505fffcac39d41006 (diff) |
optex its own format, so directly under tex/ and doc/
git-svn-id: svn://tug.org/texlive/trunk@58918 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/optex/pkg/emoji.opm')
-rw-r--r-- | Master/texmf-dist/tex/optex/pkg/emoji.opm | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/optex/pkg/emoji.opm b/Master/texmf-dist/tex/optex/pkg/emoji.opm new file mode 100644 index 00000000000..e14579135f1 --- /dev/null +++ b/Master/texmf-dist/tex/optex/pkg/emoji.opm @@ -0,0 +1,55 @@ +% This is the macro package used by OpTeX, see http://petr.olsak.net/optex + +% emoji.opm, Petr Olšák <petr@olsak.net>, 2021 + +% Emoji allows us to use colored emoticons as characters from the font. +% The \emoji{<name>} command is available, see texdoc emoji (from +% corresponding LaTeX package). + +\_namespace{emoji} + +\_codedecl \.emoji {Emotikons from the TwemojiMozilla.ttf font} + + \_doc ----------------------------- + Font TwemojiMozilla.ttf is loaded. The font feature +colr is needed. + The `\emojifont` is implemented using `\_resizethefont` as size-dependent. + \_cod ----------------------------- + +\_initunifonts +\_font\.tenemoji=[TwemojiMozilla]:+colr +\_def\.emojifont{\.tenemoji\_resizethefont} +\_def\.emoji#1{{\.emojifont\_trycs{_emoji_:#1}{\_opwarning{uknown emoji "#1"}}}} + + \_doc ----------------------------- + The mapping from names or aliases to the codes are declared in the + `emoji-table.def` file from the \LaTeX/ package emoji. + \_cod ----------------------------- + +\_bgroup + \_def\__emoji_def #1 #2#3#4#5#6{% #1=n, #2=data, #3=name, #4=aliases, #5=descr, #6=versi + \_sxdef{_emoji_:#3}{#2}% + \_ifx^#4^\_else \_foreach #4, \_do ##1, {\_global\_slet{_emoji_:##1}{_emoji_:#3}}\_fi + } + \_def\ProvidesExplFile#1#2#3#4{} + \_def\__emoji_group#1 #2{} + \_def\__emoji_subgroup#1 #2{} + \_catcode`\#=12 + \_input {emoji-table.def}% defining emoji names +\_egroup + +\_nspublic \emoji \emojifont ; + +\_endnamespace + +\_endcode + +\begtt % ----------------------- Testing file --------------------------- +\load[emoji] +We can use \emoji{grinning} or directly: {\emojifont 😀} too. +\bye +\endtt % ---------------------------------------------------------------- + +More than 3000 emoticons are available. + +If you want black-and-white pictograms, see another font: +\url{http://petr.olsak.net/optex/optex-tricks.html\#fawesome} |