Skip to content

Instantly share code, notes, and snippets.

@mfornos
Last active November 13, 2023 12:29
Show Gist options
  • Star 45 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save mfornos/9991865 to your computer and use it in GitHub Desktop.
Save mfornos/9991865 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);
@mhfmobin
Copy link

Where is the file?

@0Charliecat
Copy link

@mhfarahmandm
its a webfont

@PatricNox
Copy link

@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
Copy link
Author

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