Sorry .. I have been out on vacation .. and before that over-looked this
email anyway.
I do not have a workaround here.
I had supposed the emoji fonts provide the colour image as an
alternative that some
APIs understand and that any code asking directly for a normal glyph
image would get it
but I'd have to investigate what is happening in JDK code and how this
can be resolved.
Perhaps the emoji can be co-erced into being an ImageGraphicAttribute and we
can use TextLayout to handle it but I suspect there'll be snags ..
Obviously the crash needs to be looked at .. surprised no one has
reported that before.
-Phil.
On 4/28/2014 6:51 AM, Mark Davis ☕️ wrote:
Ping... Any workaround for Java not being able to draw these characters?
Mark <https://google.com/+MarkDavis>
/
/
/— Il meglio è l’inimico del bene —/
//
On 10 April 2014 14:45, Mark Davis ☕️ <m...@macchiato.com
<mailto:m...@macchiato.com>> wrote:
One further question.
On the Mac, some characters are given a default emoji
presentation, and appear with a colored image. This is done by
substituting the glyph from the Apple Color Emoji.
With drawString(), when I try to draw a character in (say) Symbola
that by default on the Mac is emoji, the font says
.canDisplay(...) is true, but I get no image, just blank. It's
like drawing a space.
If I try to draw /any/ character in Apple Color Emoji, I get a
blank as well.
Is there any way to work around this, and use the Apple Color Emoji?
Note: I tried using a JTextArea to work around this. When I
changed the existing TextAreaDemo.java to add the following 2
lines, it crashed!
textArea.setFont(*new* Font("Apple Color Emoji", 0, 18));
textArea.setText("abc👷def");
Same happens if the setText line is omitted, and if you simply
paste in an emoji character into the running program.
Mark <https://google.com/+MarkDavis>
/
/
/— Il meglio è l’inimico del bene —/
//