Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove gemoji and replace it with emoticon_fontify gem. #362

Closed
wants to merge 1 commit into from
Closed

Remove gemoji and replace it with emoticon_fontify gem. #362

wants to merge 1 commit into from

Conversation

@sfcgeorge
Copy link
Contributor

@sfcgeorge sfcgeorge commented Dec 28, 2012

Removal of gemoji

  • Apple almost certainly doesn't freely licence their Emoji font so
    using it without permission is probably legally a Bad Idea™.
  • The Gemoji gem has issues disabled so if there's ever a problem
    asking questions or getting it fixed is near impossible.
  • Gemoji recomends serving the images from /public which won't work in
    a mounted engine.
  • Serving the Gemoji images from /assets is possible but slows down
    precompilation hugely (over 800 images!)
  • Do we really need over 800 emoji and is it worth the 4MB penalty?

Addition of emoticon_fontify

  • The emoticon font is properly licenced, free and open source.
  • Hundreds less emojis to remember / bloat an app's size.
  • Instead of hard to remember codes like :stuck_out_tongue_closed_eyes:
    you can simply type an emoticon as you normally would and it is
    converted :-)
  • Helper method is built into the gem.
  • The gem is an engine so the necessary font and stylesheet assets are
    automatically included in the asset pipeline (just need requiring the usual way).
  • As it's a font the emoticons can easily be styled to match the
    forum's text color and size, it will zoom well, and display crisply on
    double pixel ratio devices.

Making it work

I have modified Forem to use the gem. A user of forum only has to do a few simple things to get it working.

First one must require the gem so that the asset pipeline can do its thing.

require 'emoticon_fontify'

Finally (yep just 2 steps) one has to add the emoticon stylesheet to their application.css

 *= require "emoticon_fontify/emoticons"

I'd love to hear any thoughts or suggestions. And feel free to submit an issue on the emoticon_fontify page if you find anything broken and I'll look into it.

## Removal of gemoji

* Apple almost certainly doesn't freely licence their Emoji font so
using it without permission is probably legally a Bad Idea™.
* The Gemoji gem has issues disabled so if there's ever a problem
asking questions or getting it fixed is near impossible.
* Gemoji recomends serving the images from /public which won't work in
a mounted engine.
* Serving the Gemoji images from /assets is possible but slows down
precompilation hugely (over 800 images!)
* Do we really need over 800 emoji?

## Addition of emoticon_fontify

* The emoticon font is properly licenced, free and open source.
* Hundreds less emojis.
* Instead of hard to remember codes like 😝
you can simply type an emoticon as you normally would and it is
converted :-)
* Helper method is built into the gem.
* The gem is an engine so the necessary font and stylesheet assets are
automatically included in the asset pipeline.
* As it's a font the emoticons can easily be styled to match the
forum's text color and size, it will zoom well, and display crisply on
double pixel ratio devices.
@parndt
Copy link
Contributor

@parndt parndt commented Dec 29, 2012

So to be clear this isn't emoji at all?

@sfcgeorge
Copy link
Contributor Author

@sfcgeorge sfcgeorge commented Dec 29, 2012

Correct. I kept thinking about the best way to make Gemoji work, and the problems with it, then thought, do we really want emoji? Now maybe the answer is yes (they are kinda cool), in which case ignore this pull request ;)

To me the massive size of the Gemoji gem is overkill, and nobody will remember all the codes. Which brings me to another problem, I talked to members of my forum and they didn't like having to use those codes like :stuck_out_tongue:, they'd rather just type :P like they do on Skype or other forums.

The new emoticon_fontify gem might be a little lacking, but the font it is based on accepts pull requests so it could be expanded. Alternatively the gem could switch to a fuller emoticon font if one was found and suggestd, perhaps even having a config option for which emoticon set to use. But for now, I think it's not a bad start.

The thing that concerns me the most is the legality of using Apple's emoji glyphs. See, the Unicode standard has been updated to include code points for emoji, just like there are code points for letter, numbers, etc. So, just like you might type the letter a (U+0061), or an interrobang ‽ (U+203D) it is perfectly fine to type an emoji like FACE WITHOUT MOUTH (U+1F636). However, when we type out a foobar.rb document and upload it to GitHub, we are not also including and uploading the Courier font, or Times, or Comic Sans, we are simply uploading a file full of unicode codes. But the Gemoji gem isn't just a list of all the unicode emoji codes that it converts the typed emoji names into. The gem converts the typed emoji names into png images, and those images aren't anything to do with the unicode standard, they are ripped right from Apple's emoji font (it might not be initially obvious that emoji are displayed from a font, but they are, and the font is called "Apple Color Emoji"). In effect, the Gemoji maintainers have converted Apple's emoji font to a bunch of .pngs and redistributed it. If you did that with Helvetica you'd get a strongly worded letter from Linotype's lawyers. As far as I'm aware the Apple Color Emoji font is not freely available, nor is it licenced out, it's property of Apple and to be distributed solely with Apple hardware. GitHub should really be more clued up on licensing. Perhaps GitHub did get a licence from Apple to use their font, but we can't ask them as they have issues turned off. I think a final nail in the coffin is that Windows 8 has emoji, however they don't use the Apple Color Emoji font, instead they use Microsoft's own font that is black and white (like a regular font) and quite different to Apples. If Microsoft can't steal Apple's font, I'm not comfortable with Gemoji doing so. Sorry for the long rant ;)

So to sum up, this gem is smaller, simpler, better fits user expectations, and uses only properly licensed open source materials.

@Kagetsuki
Copy link

@Kagetsuki Kagetsuki commented Jan 12, 2013

@sfcgeorge You realize those glyphs that Apple implemented were just to replicate commonly used emoji from Japan. If you have a problem with using those glyphs I think it would be more constructive to provide better licensed replacements. Personally I want emoji so a patch like this is not something I would want. Of course if others would not want emoji making it optional (like detecting if gemoji is in the bundle and using it if it is, otherwise not using it) or making it so you can specify your emoji/emoticon engine would probably be better.

@sfcgeorge
Copy link
Contributor Author

@sfcgeorge sfcgeorge commented Jan 12, 2013

@Kagetsuki Yes I agree emoji are commonly used in Japan and Apple created their own implementation, as have other handset manufacturers, OS vendors, and carriers. We are totally free to use the concept of emoji as defined by Unicode, just not Apple's implementation, or Microsoft's, or anyone else's that doesn't have an open source compatible licence. You're absolutely right, it would be more constructive to provide better licensed replacements, feel free to create the 800 or so images and submit a pull request. I spent a lot of time searching and couldn't find a comprehensive and suitably licensed alternative. I like emoji myself, I'm not against them or anything, I just think there are some big problems with the current Gemoji method of including them that need addressing.

I quite like your suggestion of making this feature optional, or abstracting it. That might be the perfect solution so people are free to use whatever emoticon/emoji set they like best, just as IM apps like Adium offer several different emoticon packs. Forem already allows the use of an external text formatter such as one of the great Markdown ones, I wonder if this idea could be extended. Perhaps there could be a new text formatter that adds emoji and wraps whichever other text formatter someone wants to use. At this point I wonder if @radar has any thoughts and wants to weigh in as I'm not seeing a perfect solution.

@Kagetsuki
Copy link

@Kagetsuki Kagetsuki commented Jan 13, 2013

Wait are you claiming the implementation was taken from Apple or just some of the images were used? If it's the implementation I'm not sure how to think of the whole situation, particularly since Apple just replicated the common emoji system found between carriers like DoCoMo and AU.

I absolutely agree with you on it being a bit scary using Apple copyrighted stuff. There could be a solution like running an kickstarter to create a free or CC set (I've got a good artist who would jump on the opportunity to create 800+ good looking emoji). I do sort of wonder if someone hasn't already though.

Making it optional would be the quickest fix, then after that add something in so you could choose a different engine or maybe even setting up a pipeline of multiple engines could be possible. Let's get some feedback from @radar before we debate any further.

@radar
Copy link
Collaborator

@radar radar commented Jan 13, 2013

I'd prefer if we could stick with the traditional emoji font set, rather than having something that's completely different. How does GitHub get away with using the emoji that they use?

@parndt
Copy link
Contributor

@parndt parndt commented Jan 13, 2013

I'd also like to know the answer to this question of how @github are using it.

@sfcgeorge
Copy link
Contributor Author

@sfcgeorge sfcgeorge commented Jan 13, 2013

It's not a traditional emoji font set, it's Apple's emjoi font. I'd ask GitHub directly how they get away with it but they have issues off so can't. I'd guess they don't understand who owns those emoji glyphs (perhaps they mistakenly think the actual graphics are included in the unicode spec). Or maybe they looked somewhere I didn't and found that Apple Color Emoji is free to use by all (I doubt that, Apple open sources some core code components, not design and features that help to sell products). Most likely they simply haven't thought about it, or think ripping images from a font is ok and somehow different from ripping a movie from a DVD and redistributing it. It could have been a GitHub employee's pet project (I believe they are encouraged to experiment for a few hours a week) that their boss thought looked cool so it got pushed throughout the site without being a properly looked at.

I'd really like to be proven wrong, if someone could find a CC licence for the glyphs from Apple then great (or any other suitable explanation). There's a good chance I am wrong, I have no legal experience and limited background experience in open source. But unless anyone can prove I am wrong, then I don't think using and redistributing commercial graphics is a good idea — I'm sure Apple's lawyers wouldn't see ignorance as an excuse.

@Kagetsuki
Copy link

@Kagetsuki Kagetsuki commented Jan 14, 2013

It was rather hard to find but, from the OSX license:

F. Fonts. Subject to the terms and conditions of this License, you may use the fonts included with the Apple Software to display and print content
while running the Apple Software; however, you may only embed fonts in content if that is permitted by the embedding restrictions
accompanying the font in question. These embedding restrictions can be found in the Font Book/Preview/Show Font Info panel.

So my guess is we're all breaking the law but Apple is either passively ignoring [likely?] it or they don't realize it [unlikely?]. I'm discussing putting up a kickstarter to create an Open Source friendly (I'm thinking CC licensed) replacement set with the Genshin artists net.kamui and se.noize.

@parndt
Copy link
Contributor

@parndt parndt commented Jan 14, 2013

@josh @juliamae sorry to rope you in but we have to ask; how is GitHub
using the Emoji font legally in Gemoji? Thanks!

@sfcgeorge
Copy link
Contributor Author

@sfcgeorge sfcgeorge commented Jan 14, 2013

@Kagetsuki Awesome, thank you for finding this. Looking in the Font Book / Show Font Info panel reveals the font is embeddable. Screenshot here: http://cl.ly/M9ne

Now, I'm not 100% sure what embeddable means.I assume it means, say you make a poster and save it as a PDF with the fonts embedded so that the print company doesn't have to have those fonts. This kind of embedding seems quite different to redistributing.

An open source emoji font/glyph set is a very interesting idea. Unicode defines all the emojis and both Apple and Microsoft have produced implementations so the framework and inspiration is there already. Doing it via Kickstarter seems sensible since creating hundreds of emoji glyphs for free in spare time seems unreasonable / it would take many spare evenings. I'd be interested to see if you explore this idea further, good luck!

@Kagetsuki
Copy link

@Kagetsuki Kagetsuki commented Jan 14, 2013

@parndt Good idea asking the authors. Why didn't we think of that 😦

@Kagetsuki
Copy link

@Kagetsuki Kagetsuki commented Jan 14, 2013

@sfcgeorge Embeddable means you can use the font in a PDF or other data file that is being distributed AS LONG AS that data is being authored on a machine that has a proper license to the font (iOS/OSX) and you are absolutely correct - gemoji is redistributing not embedding.

I'm talking net.kamui into the idea right now. He's the lead artist on our currently failing kickstarter here: http://www.kickstarter.com/projects/374397522/scroll-ninja-revised?ref=home_location We'll be re-launching but before that he'll have some down time while the lead dev catches up. This could be the perfect time-filler, and sticker sheets/cheat sheets on other goods with the newly created emoji could be nice rewards.

@Kagetsuki
Copy link

@Kagetsuki Kagetsuki commented Jan 22, 2013

Since we're not getting any response here me and Tohyama have decided to progress with the kickstarter idea anyway. We'll be putting up a campaign for a free set of emoji that includes all the standard and extended currently being provided by Apple and hopefully a few more. If anyone has suggestions for licenses they'd want etc. I'd love to hear them and why. In the end we'll probably do something like http://fortawesome.github.com/Font-Awesome/ and we'll provide an initial set with a forked-and-modified gemoji.

@knewter
Copy link
Contributor

@knewter knewter commented Jan 22, 2013

I think that sounds awesome, and I'd be super happy if such a thing made
its way into the world. Let me know when the kickstarter's up and I'll
share it on le twitter

On Tue, Jan 22, 2013 at 11:06 AM, 影月 零 notifications@github.com wrote:

Since we're not getting any response here me and Tohyama have decided to
progress with the kickstarter idea. We'll be putting up a campaign for a
free set of emoji that includes all the standard and extended currently
being provided by Apple and hopefully a few more. If anyone has suggestions
for licenses they'd want etc. I'd love to hear them and why. In the end
we'll probably do something like
http://fortawesome.github.com/Font-Awesome/ and we'll provide an initial
set with a forked-and-modified gemoji.


Reply to this email directly or view it on GitHubhttps://github.com//pull/362#issuecomment-12554515.

Josh Adams
CTO | isotope|eleven http://www.isotope11.com
cell 215-3957
work 476-8671 x201

@parndt
Copy link
Contributor

@parndt parndt commented Jan 22, 2013

Nothing more restrictive than an MIT license please (aka no GPL)

@radar
Copy link
Collaborator

@radar radar commented Jan 23, 2013

This is a great idea guys. Thanks for taking the initiative.

On 23 January 2013 06:57, Philip Arndt notifications@github.com wrote:

Nothing more restrictive than an MIT license please (aka no GPL)


Reply to this email directly or view it on GitHubhttps://github.com//pull/362#issuecomment-12562998.

@Kagetsuki
Copy link

@Kagetsuki Kagetsuki commented Jan 23, 2013

@parndt I think we'll use the same license set as FontAwesome, SIL for the font we generate, MIT for code and CC for the images themselves. That way anyone can use it anyway any time and not need to worry about doing anything in particular.

@parndt
Copy link
Contributor

@parndt parndt commented Jan 23, 2013

CC without attribution, right?

@Kagetsuki
Copy link

@Kagetsuki Kagetsuki commented Jan 23, 2013

@parndt yup, no attribution required. I mean credit would be nice but that kind of defeats the point. http://fortawesome.github.com/Font-Awesome/#license has a description of the combo and links.

@Kagetsuki
Copy link

@Kagetsuki Kagetsuki commented Feb 1, 2013

We'll be putting up the kickstarter soon. I'll contact everyone once it's up - getting the word out will be much appreciated. We even made some initial samples and we'll at least release those for free regardless of success of the campaign.

@sfcgeorge
Copy link
Contributor Author

@sfcgeorge sfcgeorge commented Feb 5, 2013

A fried suggested something to me that seems so obvious now. Clearly Apples emoji are not free for the picking, however Android is open source and has emoji! So after quite a bit of digging I found the AndroidEmoji.ttf with licence "Licensed under the Apache License, Version 2.0". It is not a color font like Apples but a traditional vector font. On the plus side this means it is small enough to be included entirely on a web page, though it's not as pretty.

With this font, one option would be to embed the font in the page as a webont. Then, a gem on Forem's side would convert the :lengthy_emoji_name: into the actual UTF8 character code. Here's the genius part: If a user already has emoji built into their device, they can use their emoji keyboard directly to type the emoji without having to remember :ridiculously_long_codes:. Moreover, if a user has an Apple device, when they view a forem post with the UTF8 emoji codes in they will be displayed in the native Apple font - this is legal as it is simply using the font right on the device as intended. A Windows 8 user will see the emojis rendered in the Win8 emoji font, etc. Then, if a user doesn't have an emoji font built into their OS (maybe they're using BeOS or something) then the CSS will cascade and fall back to the included Android font. So:

  • Users with an emoji keyboard can type emojis directly, as they are used to
  • Users without an emoji keyboard can type an :emoji_code:
  • Users with an emoji font built into their OS will see emoji rendered in that
  • Users without an emoji font built into their OS will see emoji rendered in the AndroidEmoji.ttf

What do you guys think of this idea? If I was to make a gem to do this do you think that would be an acceptable solution?

@Kagetsuki you could still go ahead with the Kickstarter if you specifically want color emojis - I think this could be a good thing. It's rare for really good design to be open source so it could be interesting.

@knewter
Copy link
Contributor

@knewter knewter commented Feb 5, 2013

This is clearly the superior technical solution. I had not considered oy at
all. Thanks. If you made such a gem it would be a no bassinet for most
projects to use it i think
On Feb 5, 2013 5:39 AM, "sfcgeorge" notifications@github.com wrote:

A fried suggested something to me that seems so obvious now. Clearly
Apples emoji are not free for the picking, however Android is open source
and has emoji! So after quite a bit of digging I found the
AndroidEmoji.ttf http://cl.ly/MLa4 with licence "Licensed under the
Apache License, Version 2.0". It is not a color font like Apples but a
traditional vector font. On the plus side this means it is small enough to
be included entirely on a web page, though it's not as pretty.

With this font, one option would be to embed the font in the page as a
webont. Then, a gem on Forem's side would convert the :lengthy_emoji_name:into the actual UTF8 character code. Here's the genius part: If a user
already has emoji built into their device, they can use their emoji
keyboard directly to type the emoji without having to remember
:ridiculously_long_codes:. Moreover, if a user has an Apple device, when
they view a forem post with the UTF8 emoji codes in they will be displayed
in the native Apple font - this is legal as it is simply using the font
right on the device as intended. A Windows 8 user will see the emojis
rendered in the Win8 emoji font, etc. Then, if a user doesn't have an emoji
font built into their OS (maybe they're using BeOS or something) then the
CSS will cascade and fall back to the included Android font. So:

  • Users with an emoji keyboard can type emojis directly, as they are
    used to
  • Users without an emoji keyboard can type an :emoji_code:
  • Users with an emoji font built into their OS will see emoji rendered
    in that
  • Users without an emoji font built into their OS will see emoji
    rendered in the AndroidEmoji.ttf

What do you guys think of this idea? If I was to make a gem to do this do
you think that would be an acceptable solution?

@Kagetsuki https://github.com/Kagetsuki you could still go ahead with
the Kickstarter if you specifically want color emojis - I think this could
be a good thing. It's rare for really good design to be open source so it
could be interesting.


Reply to this email directly or view it on GitHubhttps://github.com//pull/362#issuecomment-13125479.

@sfcgeorge
Copy link
Contributor Author

@sfcgeorge sfcgeorge commented Feb 5, 2013

@knewter Thanks for the thumbs up. I can use the codes from gemoji as a basis and some of the work from emoticon_fontify too. Hopefully I'll have time to start work on it soon. So initially the gem would include AndroidEmoji.ttf as the fallback but it could be updated in the future to include any new emoji font created.

@Kagetsuki
Copy link

@Kagetsuki Kagetsuki commented Feb 6, 2013

@sfcgeorge we've started working on modifying gemoji and created some samples for the project. We'd have the kickstarter up by now but I've been swamped. Tohyama made some excellent samples for most of the faces, much nicer than the Apple ones if you ask me. How about we team up, convert gemoji to the Android set and add in the face samples, then we'll throw up the kickstarter to complete the set in full color vectors etc. That way we'll have a valid license right away so we don't need to worry about Apple and we'll have a future path with a full color rich set. What do you say?

@Kagetsuki
Copy link

@Kagetsuki Kagetsuki commented Feb 6, 2013

@sfcgeorge Re-reading your comment I really like your idea better than just overriding the defaults in gemoji. How about we team up on the kickstarter so we can get you paid for your work too? If you're interested let's lay out a plan.

@sfcgeorge
Copy link
Contributor Author

@sfcgeorge sfcgeorge commented Feb 6, 2013

@Kagetsuki I think the best thing you could do is create plain image glyphs, so 800 replacement .pngs. These should be large-ish so they can be used for a variety of uses, maybe 128px ish? Those images can then be used in any way later; bundled into a font, or included gemoji style. I wouldn't worry about the implementation for your kickstarter as that can come later provided flexible enough source files. I'm not sure if other OSes even support full color bitmap fonts actually or if it's just Apple OSes, that could be an issue. Also since 800 is a lot, you could start with the 'core' faces, then build up.

I'm not sure how much use I'd be teaming up with you on a kickstarter, you'd probably want just 1 designer for consistency, and I have personal projects, client work and uni work keeping me busy. But feel free to email me if you want and I'll see how I can help out. Address: simon @ (github username) .co.uk

@Kagetsuki
Copy link

@Kagetsuki Kagetsuki commented Feb 7, 2013

@scfgeorge It's actually going to be easier working out of gemoji than not - this way we'll have a full implementation right away and we can drop in new images when we make them. I also want to be able to build a font file from a rake command so in the future if there are updates we can just build the font or other developers can do it themselves. The sample set we created we've output to PNG of the same size as gemoji but the raws are all vector so we may distribute a set of SVG as well.

As for the actual image/glyph creation I'd like Tohyama to be doing that. I just really like your gem idea and think that would be a very nice implementation to serve the created assets on. Also I'm constantly bogged down with work and a little understudied on how these fonts work whereas you seem to have done your homework and are rearing to go - so it seems to me having you do the coding [to an advanced implementation] would be better for everyone. We'll continue with the current plan for now but perhaps funding your efforts would be good to put down as a reach goal? I'll e-mail you in a little bit with the kickstarter preview project and an archive of the samples Tohyama has produced so far.

@Kagetsuki
Copy link

@Kagetsuki Kagetsuki commented Feb 23, 2013

Just an update everyone, we've finally got the kickstarter campaign up http://www.kickstarter.com/projects/374397522/phantom-open-emoji . Please pass it around, Tohyama will start making images as soon as the initial goal is hit.

I'll have a repo up with the assets and some scripts as soon as we see some interest from the kickstarter project.

@sfcgeorge
Copy link
Contributor Author

@sfcgeorge sfcgeorge commented Feb 24, 2013

Thanks for your hard work, it's looking great so far. I of course backed, hopefully enough others do that this can become the best set for integration into open source forums, blogs, comment systems, etc.

@knewter
Copy link
Contributor

@knewter knewter commented Feb 24, 2013

I backed it. Awesome guys
On Feb 23, 2013 6:43 PM, "sfcgeorge" notifications@github.com wrote:

Thanks for your hard work, it's looking great so far. I of course backed,
hopefully enough others do that this can become the best set for
integration into open source forums, blogs, comment systems, etc.


Reply to this email directly or view it on GitHubhttps://github.com//pull/362#issuecomment-14001182.

@knewter
Copy link
Contributor

@knewter knewter commented Apr 15, 2013

So for clarification, the kickstarter for Phantom Open Emoji was successfully backed, and consequently the plan is to ultimately use a gem that uses those emoji. Having said that, I propose (a) closing this PR unmerged, and (b) congratulating @Kagetsuki et al. I'll cover both of those now. Congrats @Kagetsuki!

@knewter knewter closed this Apr 15, 2013
@radar
Copy link
Collaborator

@radar radar commented Apr 16, 2013

Congratulations @Kagetsuki! 🤘

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants