Re: [NTG-context] Typesetting unicode characters

2022-03-31 Thread Thangalin via ntg-context
On the rare chance that someone else stumbles across this problem ...

By default, Java's Xalan transformer for creating XML documents does not
correctly encode emojis. Instead of  for the thumbs up emoji,
Xalan encodes it as . As Arthur pointed out, this is not a
valid entity encoding.

One solution is to use Saxonica's Saxon 11 transformer, which produces the
expected output:

  


  the  emoji

  

In Java, switching to Saxon entails installing the Jar files for Saxonica
and its resolvers. Then set the system property before invoking the XML
transformer: System.setProperty( "javax.xml.transform.TransformerFactory",
"net.sf.saxon.TransformerFactoryImpl" );

ConTeXt handles the emoji from the transformed XML file without any issues.

Thank you, Arthur.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Typesetting unicode characters

2022-03-30 Thread Arthur Rosendahl via ntg-context
On Wed, Mar 30, 2022 at 12:32:11AM -0700, Thangalin via ntg-context wrote:
> An XML document includes the  emoji, as shown in the following snippet:
> 
> 
>   
>   
> 
>   Thumbs up emoji: 

  Try the correct escape sequence :-)  That’s  -- or
equivalently 

Best,

Arthur
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Typesetting unicode characters

2022-03-30 Thread Thangalin via ntg-context
Hi list,

An XML document includes the  emoji, as shown in the following snippet:


  
  

  Thumbs up emoji: 

  

The document is typeset using ConTeXt, but the thumbs up emoji isn't in the
PDF. Neither Noto Emoji nor Open Sans Emoji fonts will render.

Does anyone have a minimal example that shows how to typeset such escaped
entities?

When the emoji is added directly to a document, it works fine:

\definefont [TextFontEmoji] [opensansemoji]

\starttext
  \TextFontEmoji{Thumbs up emoji: }
\stoptext

Is there something special that needs to be set for ConTeXt to interpret
the escaped unicode values as an emoji?

Thank you!
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___