Another quick example: Emoji in PyScript

I put together a little example demonstrating a colourful way to present and work with emoji in PyScript:

https://about.nmstoker.com/emoji.html

The source is in the page for all to see, but in a nutshell it’s using the emoji package to turn text with the spelt out emoji names (eg :cold_face:into :cold_face:) into the actual emoji characters and then the web page itself has included an emoji font, Noto Color Emoji, with the font-family set as follows:

font-family: 'Noto Color Emoji', sans-serif;

which preferentially uses the emoji font for emoji characters but falls back to sans-serif for everything else. As a result the emoji should show up in colour (without this step, some browsers end up displaying a monochrome emoji icon otherwise).

3 Likes