Skip to content

Instantly share code, notes, and snippets.

@fuxu
Forked from mfornos/emoji-font.css
Created October 21, 2016 13:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fuxu/a34ceb254b2cbf01cd7f2f601bc01d94 to your computer and use it in GitHub Desktop.
Save fuxu/a34ceb254b2cbf01cd7f2f601bc01d94 to your computer and use it in GitHub Desktop.
/*
-----------------------------------
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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment