crystal-emojis-full

Full Twemoji emoji set (~4000 SVGs) embedded at compile time. Pure Crystal.

= crystal-emojis-full :toc: macro :toclevels: 2

The full ~4000-emoji Twemoji set as embedded SVG. Pure Crystal, no runtime dependency.

πŸ‡«πŸ‡· Lisez ce document en franΓ§ais : link:README.fr.adoc[README.fr.adoc]

For a curated 200-emoji subset that covers most technical documentation needs at a fraction of the binary size, see the sibling shard https://github.com/aloli-crystal/crystal-emojis-lite[crystal-emojis-lite].

toc::[]

== When to use this vs crystal-emojis-lite

[cols="1,1,1"] |=== | | crystal-emojis-lite | crystal-emojis-full

| Emoji count | ~208 (curated) | ~4000 (everything)

| ZWJ joins (πŸ‘¨β€πŸ’», πŸ‘¨β€πŸ‘©β€πŸ‘§) | ❌ | βœ…

| Skin tone modifiers (πŸ‘‹πŸ½) | ❌ | βœ…

| Regional flags (πŸ‡«πŸ‡·) | ❌ (use crystal-flags) | βœ…

| Embedded payload | ~840 KB | ~18 MB

| Module name | CrystalEmojis | CrystalEmojisFull |===

Pick lite when you write technical documentation (only need status icons, colours, dev tools…). Pick full when you need unrestricted emoji coverage (chat-style content, social-media exports, etc.).

== Installation

[source,yaml]

dependencies: crystal-emojis-full: github: aloli-crystal/crystal-emojis-full version: "~> 0.1"

== Usage

Same API as crystal-emojis-lite, just with a different module name (CrystalEmojisFull instead of CrystalEmojis). This lets the two shards coexist if you need to compare or migrate between them.

[source,crystal]

require "crystal-emojis-full"

Single-codepoint lookup.

CrystalEmojisFull.svg('βœ…') # => "<svg ...>" CrystalEmojisFull.svg(0x2705) # => same

Multi-codepoint sequences (ZWJ joins, skin tones, flags).

πŸ‘¨β€πŸ’» = MAN + ZWJ + LAPTOP

CrystalEmojisFull.svg([0x1F468, 0x200D, 0x1F4BB])

πŸ‡«πŸ‡· = REGIONAL_INDICATOR_F + REGIONAL_INDICATOR_R

CrystalEmojisFull.svg([0x1F1EB, 0x1F1F7])

Detection.

CrystalEmojisFull.includes?('πŸ¦„') # => true (not in lite)

Discovery.

CrystalEmojisFull.size # => 4009 CrystalEmojisFull.keys # => ["1f004", "1f0cf", …]

== Compilation cost

Embedding 4000+ files via read_file macros adds ~1-2 seconds to the compile time of dependent projects (measured on Crystal 1.19, M-series Mac). Negligible on a release build, noticeable on iterative crystal run cycles. If that's a problem, prefer crystal-emojis-lite.

== Attribution

Twemoji Β© Twitter, Inc and other contributors. CC-BY 4.0 β€” see data/svg/LICENSE-twemoji.txt for the full text.

Required attribution when redistributing :

[source]

Graphics: Twemoji, Β© Twitter, Inc, CC-BY 4.0 https://github.com/jdecked/twemoji

== Licence summary

  • Crystal code : MIT, see link:LICENSE[LICENSE]
  • Embedded SVG graphics : Twemoji CC-BY 4.0
Repository

crystal-emojis-full

Owner
Statistic
  • 0
  • 0
  • 0
  • 0
  • 1
  • about 8 hours ago
  • April 25, 2026
License

MIT License

Links
Synced at

Sat, 25 Apr 2026 23:37:57 GMT

Languages