Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/*
-----------------------------------
Emoji - natural display for the web
-----------------------------------
These font face definitions allows to display emoji glyphs intermingled with
arbitrary characters outside emoji unicode blocks.
Usage
-----
<p style="font-family: emoji;">
You can mix text with em😶ji glyphs, like this one 💓,
WITHOUT wrapping into any HTML tag. 💕
</p>
Known Limitations
-----------------
- See https://developer.mozilla.org/en-US/docs/Web/CSS/unicode-range
for unicode-range CSS descriptor compatibility.
Have fun!
*/
@font-face {
font-family: emoji;
/* Fonts for text outside emoji blocks */
src: local('Droid Sans Mono'),
local('Lucida Console'),
local('Arial Monospaced'),
local(Arial);
}
@font-face {
font-family: emoji;
src: local('Apple Color Emoji'),
local('Android Emoji'),
local('Segoe UI'),
local(EmojiSymbols),
local(Symbola),
url('font/Symbola-Emoji.eot?#iefix') format('embedded-opentype'),
url('font/Symbola-Emoji.woff') format('woff'),
url('font/Symbola-Emoji.ttf') format('truetype');
/* Emoji unicode blocks */
unicode-range: U+1F300-1F5FF, U+1F600-1F64F, U+1F680-1F6FF, U+2600-26FF;
}
#!/usr/bin/fontforge
/*
==================
Keeps Emoji Glyphs
==================
Usage:
$ chmod +x emoji.pe
$ ./emoji.pe
alternately
$ fontforge -script emoji.pe font.ttf emoji-font.ttf
*/
Open($argv[1]);
SelectNone();
SelectMore(0u1F300, 0u1F5FF);
SelectMore(0u1F600, 0u1F64F);
SelectMore(0u1F680, 0u1F6FF);
SelectMore(0u2600, 0u26FF);
SelectInvert();
Clear();
Generate($argv[2], "", 4);
@mhfarahmandm

This comment has been minimized.

Copy link

@mhfarahmandm mhfarahmandm commented Dec 21, 2018

Where is the file?

@slovak-cat

This comment has been minimized.

Copy link

@slovak-cat slovak-cat commented May 7, 2020

@mhfarahmandm
its a webfont

@PatricNox

This comment has been minimized.

Copy link

@PatricNox PatricNox commented Oct 12, 2020

@mhfarahmandm
its a webfont

Yes but these imports are missing from the gist.

   url('font/Symbola-Emoji.eot?#iefix') format('embedded-opentype'),
   url('font/Symbola-Emoji.woff') format('woff'),
   url('font/Symbola-Emoji.ttf') format('truetype');
@mfornos

This comment has been minimized.

Copy link
Owner Author

@mfornos mfornos commented Feb 2, 2021

@mhfarahmandm
its a webfont

Yes but these imports are missing from the gist.

   url('font/Symbola-Emoji.eot?#iefix') format('embedded-opentype'),
   url('font/Symbola-Emoji.woff') format('woff'),
   url('font/Symbola-Emoji.ttf') format('truetype');

These fonts are supposed to be generated using the posted emoji.pe Font Forge script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment