crystal-emojis-full
= 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
crystal-emojis-full
- 0
- 0
- 0
- 0
- 1
- about 8 hours ago
- April 25, 2026
MIT License
Sat, 25 Apr 2026 23:37:57 GMT