Skip to content
This repository has been archived by the owner on Jul 23, 2019. It is now read-only.

Commit

Permalink
updated to 4.5
Browse files Browse the repository at this point in the history
  • Loading branch information
caseyahenson committed Feb 15, 2019
1 parent 8cd9e49 commit c18a233
Show file tree
Hide file tree
Showing 13 changed files with 61 additions and 43 deletions.
4 changes: 2 additions & 2 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#### EmojiOne Artwork

* Applies to all PNG files found in the emojione-assets repo as well as any adaptations made.
* Free license: [emojione.com/developers/free-license](https://www.emojione.com/developers/free-license)
* Premium license: [emojione.com/developers/premium-license](https://www.emojione.com/developers/premium-license)
* Free license: [emojione.com/licenses/free](https://www.emojione.com/licenses/free)
* Premium license: [emojione.com/licenses/premium](https://www.emojione.com/licenses/premium)


#### EmojiOne Non-Artwork
Expand Down
6 changes: 3 additions & 3 deletions extras/fonts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ There's no better way to port our emoji into your device than through a native f
> Note: Due to their size, the font files have been removed from this repo and instead will be attached to releases on our repo that hosts the artwork and related assets, [emojione-assets](https://github.com/emojione/emojione-assets).
>
> Please go here to download the font files: [emojione-assets/releases](https://github.com/emojione/emojione-assets/releases)
### Google Font - [emojione-android.ttf](https://github.com/emojione/emojione-assets/releases/download/4.0.1/emojione-android.ttf)
### Google Font - [emojione-android.ttf](https://github.com/emojione/emojione-assets/releases/download/4.5/emojione-android.ttf)

* Compatible with rooted Android devices and Linux.
* Updated Sept 12, 2018
Expand All @@ -28,8 +28,8 @@ Linux Setup Help:
### Apple Font

**For latest apple devices**
- [emojione-mac.ttc](https://github.com/emojione/emojione-assets/releases/download/4.0.1/emojione-mac.ttc)
- [emojione-ios.ttc](https://github.com/emojione/emojione-assets/releases/download/4.0.1/emojione-ios.ttc)
- [emojione-mac.ttc](https://github.com/emojione/emojione-assets/releases/download/4.5/emojione-mac.ttc)
- [emojione-ios.ttc](https://github.com/emojione/emojione-assets/releases/download/4.5/emojione-ios.ttc)

* Compatible with Mac OSX, and iOS devices (iPhone, iPad).
* Rename font to Apple Color Emoji.ttc for Mac OSX.
Expand Down
4 changes: 2 additions & 2 deletions lib/emojione-awesome/emojione-awesome.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ $size-map: (
@each $code, $name in $emoji-map {

.e1a-#{$name} {
background-image: url("https://cdn.jsdelivr.net/emojione/assets/4.0/png/128/#{$code}.png");
background-image: url("https://cdn.jsdelivr.net/emojione/assets/4.5/png/128/#{$code}.png");
}

.e1a-rel-#{$name} {
background-image: url("emojione/assets/4.0/png/128/#{$code}.png");
background-image: url("emojione/assets/4.5/png/128/#{$code}.png");
}
}
28 changes: 23 additions & 5 deletions lib/js/emojione.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions lib/js/tests/tests.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
QUnit.module("toImage");

QUnit.test( "test toImage", function( assert ) {
assert.equal(emojione.toImage("Hello world! 😄 :smile:"), "Hello world! <img class=\"emojione\" alt=\"😄\" title=\":smile:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.0/png/64/1f604.png\"/> <img class=\"emojione\" alt=\"😄\" title=\":smile:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.0/png/64/1f604.png\"/>");
assert.equal(emojione.toImage("Hello world! 😄 :smile:"), "Hello world! <img class=\"emojione\" alt=\"😄\" title=\":smile:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.5/png/64/1f604.png\"/> <img class=\"emojione\" alt=\"😄\" title=\":smile:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.5/png/64/1f604.png\"/>");
});

QUnit.test( "mixed ascii, regular unicode and duplicate emoji", function( assert ) {
assert.equal(emojione.toImage(":alien: is 👽 and 저 is not :alien: or :alien: also :randomy: is not emoji"), "<img class=\"emojione\" alt=\"👽\" title=\":alien:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.0/png/64/1f47d.png\"/> is <img class=\"emojione\" alt=\"👽\" title=\":alien:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.0/png/64/1f47d.png\"/> and 저 is not <img class=\"emojione\" alt=\"👽\" title=\":alien:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.0/png/64/1f47d.png\"/> or <img class=\"emojione\" alt=\"👽\" title=\":alien:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.0/png/64/1f47d.png\"/> also :randomy: is not emoji");
assert.equal(emojione.toImage(":alien: is 👽 and 저 is not :alien: or :alien: also :randomy: is not emoji"), "<img class=\"emojione\" alt=\"👽\" title=\":alien:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.5/png/64/1f47d.png\"/> is <img class=\"emojione\" alt=\"👽\" title=\":alien:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.5/png/64/1f47d.png\"/> and 저 is not <img class=\"emojione\" alt=\"👽\" title=\":alien:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.5/png/64/1f47d.png\"/> or <img class=\"emojione\" alt=\"👽\" title=\":alien:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.5/png/64/1f47d.png\"/> also :randomy: is not emoji");
});


Expand Down Expand Up @@ -73,27 +73,27 @@
QUnit.module("shortnameToImage");

QUnit.test( "single shortname character conversion", function( assert ) {
assert.equal(emojione.shortnameToImage("Hello world! 😄 :smile:"), "Hello world! 😄 <img class=\"emojione\" alt=\"😄\" title=\":smile:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.0/png/64/1f604.png\"/>");
assert.equal(emojione.shortnameToImage("Hello world! 😄 :smile:"), "Hello world! 😄 <img class=\"emojione\" alt=\"😄\" title=\":smile:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.5/png/64/1f604.png\"/>");
});

QUnit.test( "shortname at start of sentence with apostrophe", function( assert ) {
assert.equal(emojione.shortnameToImage(":snail:'s are cool!"), "<img class=\"emojione\" alt=\"🐌\" title=\":snail:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.0/png/64/1f40c.png\"/>'s are cool!");
assert.equal(emojione.shortnameToImage(":snail:'s are cool!"), "<img class=\"emojione\" alt=\"🐌\" title=\":snail:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.5/png/64/1f40c.png\"/>'s are cool!");
});

QUnit.test( "shortname shares a colon", function( assert ) {
assert.equal(emojione.shortnameToImage(":invalid:snail:"), ":invalid<img class=\"emojione\" alt=\"🐌\" title=\":snail:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.0/png/64/1f40c.png\"/>");
assert.equal(emojione.shortnameToImage(":invalid:snail:"), ":invalid<img class=\"emojione\" alt=\"🐌\" title=\":snail:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.5/png/64/1f40c.png\"/>");
});

QUnit.test( "mixed ascii, regular unicode and duplicate emoji", function( assert ) {
assert.equal(emojione.shortnameToImage(":alien: is 👽 and 저 is not :alien: or :alien: also :randomy: is not emoji"), "<img class=\"emojione\" alt=\"👽\" title=\":alien:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.0/png/64/1f47d.png\"/> is 👽 and 저 is not <img class=\"emojione\" alt=\"👽\" title=\":alien:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.0/png/64/1f47d.png\"/> or <img class=\"emojione\" alt=\"👽\" title=\":alien:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.0/png/64/1f47d.png\"/> also :randomy: is not emoji");
assert.equal(emojione.shortnameToImage(":alien: is 👽 and 저 is not :alien: or :alien: also :randomy: is not emoji"), "<img class=\"emojione\" alt=\"👽\" title=\":alien:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.5/png/64/1f47d.png\"/> is 👽 and 저 is not <img class=\"emojione\" alt=\"👽\" title=\":alien:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.5/png/64/1f47d.png\"/> or <img class=\"emojione\" alt=\"👽\" title=\":alien:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.5/png/64/1f47d.png\"/> also :randomy: is not emoji");
});

QUnit.test( "multiline emoji string", function( assert ) {
assert.equal(emojione.shortnameToImage(":dancer:\n:dancer:"), "<img class=\"emojione\" alt=\"💃\" title=\":dancer:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.0/png/64/1f483.png\"/>\n<img class=\"emojione\" alt=\"💃\" title=\":dancer:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.0/png/64/1f483.png\"/>");
assert.equal(emojione.shortnameToImage(":dancer:\n:dancer:"), "<img class=\"emojione\" alt=\"💃\" title=\":dancer:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.5/png/64/1f483.png\"/>\n<img class=\"emojione\" alt=\"💃\" title=\":dancer:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.5/png/64/1f483.png\"/>");
});

QUnit.test( "triple emoji string", function( assert ) {
assert.equal(emojione.shortnameToImage(":dancer::dancer::alien:"), "<img class=\"emojione\" alt=\"💃\" title=\":dancer:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.0/png/64/1f483.png\"/><img class=\"emojione\" alt=\"💃\" title=\":dancer:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.0/png/64/1f483.png\"/><img class=\"emojione\" alt=\"👽\" title=\":alien:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.0/png/64/1f47d.png\"/>");
assert.equal(emojione.shortnameToImage(":dancer::dancer::alien:"), "<img class=\"emojione\" alt=\"💃\" title=\":dancer:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.5/png/64/1f483.png\"/><img class=\"emojione\" alt=\"💃\" title=\":dancer:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.5/png/64/1f483.png\"/><img class=\"emojione\" alt=\"👽\" title=\":alien:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.5/png/64/1f47d.png\"/>");
});


Expand Down Expand Up @@ -123,15 +123,15 @@
QUnit.module("toImage");

QUnit.test( "single character shortname conversion", function( assert ) {
assert.equal(emojione.toImage("Hello world! 😄 :smile:"), "Hello world! <img class=\"emojione\" alt=\"😄\" title=\":smile:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.0/png/64/1f604.png\"/> <img class=\"emojione\" alt=\"😄\" title=\":smile:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.0/png/64/1f604.png\"/>");
assert.equal(emojione.toImage("Hello world! 😄 :smile:"), "Hello world! <img class=\"emojione\" alt=\"😄\" title=\":smile:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.5/png/64/1f604.png\"/> <img class=\"emojione\" alt=\"😄\" title=\":smile:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.5/png/64/1f604.png\"/>");
});

QUnit.test( "shortname shares a colon", function( assert ) {
assert.equal(emojione.toImage(":invalid:snail:"), ":invalid<img class=\"emojione\" alt=\"🐌\" title=\":snail:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.0/png/64/1f40c.png\"/>");
assert.equal(emojione.toImage(":invalid:snail:"), ":invalid<img class=\"emojione\" alt=\"🐌\" title=\":snail:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.5/png/64/1f40c.png\"/>");
});

QUnit.test( "single unicode character conversion", function( assert ) {
assert.equal(emojione.toImage("🐌"), "<img class=\"emojione\" alt=\"🐌\" title=\":snail:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.0/png/64/1f40c.png\"/>");
assert.equal(emojione.toImage("🐌"), "<img class=\"emojione\" alt=\"🐌\" title=\":snail:\" src=\"https://cdn.jsdelivr.net/emojione/assets/4.5/png/64/1f40c.png\"/>");
});


Expand Down
Loading

0 comments on commit c18a233

Please sign in to comment.