convert Apple Color Emoji

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
coryvirok
Posts: 3
Joined: 2013-03-28T01:28:42-07:00
Authentication code: 6789

convert Apple Color Emoji

Post by coryvirok »

I'm trying to convert a glyph from the Mac OS X "Apple Color Emoji.ttf" font to a PNG.

convert -font ./Apple\ Color\ Emoji.ttf -background none -pointsize 96 label:$x $x.png

$x refers to the label. The above generates a blank image. Any thoughts on what I might be doing wrong?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: convert Apple Color Emoji

Post by snibgo »

It should work, giving black letters. What version of IM are you using?
snibgo's IM pages: im.snibgo.com
coryvirok
Posts: 3
Joined: 2013-03-28T01:28:42-07:00
Authentication code: 6789

Re: convert Apple Color Emoji

Post by coryvirok »

bash-3.2$ convert --version
Version: ImageMagick 6.7.7-6 2013-03-27 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenCL

Also, I'd like the resulting image to have the same colors as the glyph.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: convert Apple Color Emoji

Post by snibgo »

Despite the apparent date, 6.7.7 is an ancient version. I suggest you upgrade and try the command again.
snibgo's IM pages: im.snibgo.com
coryvirok
Posts: 3
Joined: 2013-03-28T01:28:42-07:00
Authentication code: 6789

Re: convert Apple Color Emoji

Post by coryvirok »

I just downloaded and compiled/linked the latest source:

Version: ImageMagick 6.8.4-2 2013-03-28 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC
Features: DPC OpenMP
Delegates: bzlib freetype jng jpeg png x xml zlib

I'm still seeing just blank images, (or white if I remove the -background none option.)

This particular font is a color font with embedded bitmaps: http://typographica.org/typeface-review ... lor-emoji/
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: convert Apple Color Emoji

Post by snibgo »

... a color font with embedded bitmaps ...
Ah. Doubtless that's the issue.
snibgo's IM pages: im.snibgo.com
gmaxera
Posts: 7
Joined: 2016-01-05T10:29:44-07:00
Authentication code: 1151

Re: convert Apple Color Emoji

Post by gmaxera »

I'm getting the same problem with ImageMagick 6.9.2-10
Is it possible that since 2013 ImageMagick still not support these kind of fonts ?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: convert Apple Color Emoji

Post by fmw42 »

As far as I know, those color emojis are not fonts that IM supports. Typical fonts are .ttf and a few others.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: convert Apple Color Emoji

Post by magick »

ImageMagick relies on the Freetype delegate library to render TrueType fonts. If Freetype cannot read the font, there is no hope that ImageMagick will be able to render the characters. ImageMagick cannot read AppleColorEmoji.ttf. Try it with the Freetype library utilities. If it can read it-- that would indicate a bug in ImageMagick.
gmaxera
Posts: 7
Joined: 2016-01-05T10:29:44-07:00
Authentication code: 1151

Re: convert Apple Color Emoji

Post by gmaxera »

From what I know freetype support Apple color emoji TTF font since version 2.5.2
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: convert Apple Color Emoji

Post by magick »

We tried a couple of font renderers available on Linux and they failed to grok Apple color emoji TTF. We'll keep investigating and see if we can find a solution.
gmaxera
Posts: 7
Joined: 2016-01-05T10:29:44-07:00
Authentication code: 1151

Re: convert Apple Color Emoji

Post by gmaxera »

How can I simple test if freetype support the Apple color emoji font well ??
I didn't find a sample application to use for test freetype font support
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: convert Apple Color Emoji

Post by magick »

Freetype includes a separate download for their demos. Fedora, for example, includes these in the repos as freetype-demos. Use one of the demo programs to verify if Freetype can grok your TTF file. If so, we can assume the rendering problem is with ImageMagick.
gmaxera
Posts: 7
Joined: 2016-01-05T10:29:44-07:00
Authentication code: 1151

Re: convert Apple Color Emoji

Post by gmaxera »

I found these references that clearly state that freetype support the coloured emojis font.
http://git.savannah.gnu.org/cgit/freety ... d410571b65
https://code.google.com/p/google-securi ... ail?id=168
gmaxera
Posts: 7
Joined: 2016-01-05T10:29:44-07:00
Authentication code: 1151

Re: convert Apple Color Emoji

Post by gmaxera »

I finally tested using ftview and it worked.
Debian 8.2 live + freetype 2.6.1
Here the screenshot:
http://32e506a6aea3853b929e-0b1385a62d7 ... _apple.png
Post Reply