marsilea.plotter.Emoji#

class Emoji(codes, lang='en', scale=1, spacing=0.1, **kwargs)#

Bases: Image

Have fun with emoji images

The emoji images are from twemoji.

You can will all twemoji from here

Parameters:
codesarray of str

The emoji codes. You can input either unicode or short code.

langstr, default: β€œen”

The language of the emoji.

scalefloat, default: 1

The scale of the emoji.

spacingfloat, default: 0.1

The spacing between emoji, a value between 0 and 1, relative to the emoji container size.

Examples

>>> import marsilea as ma
>>> c = ma.ZeroHeight(width=2)
>>> c.add_top(ma.plotter.Emoji("πŸ˜†πŸ˜†πŸ€£πŸ˜‚πŸ˜‰πŸ˜‡πŸπŸ¦€πŸ¦„"))
>>> c.render()
../../_images/marsilea-plotter-Emoji-1.png