Ticket Created
over 3 years ago

WERETECH-12821

RFC: Add support for the following UTF-8 chars in MonkeyC

In order to have useful communication with the end user regardless of language it is easy to get a message across for certain things with symbols.

It would be very nice/helpful if we can get support for the following UTF-8 chars

Heartrate: ♡ (U+2661) / Hearts (U+2665) / Heart (U+2764) / Heartbeat (U+1F493)

Female: ♀ (U+2640) / ⚢ (U+26A2)

Male: ♂ (U+2642) / ⚣ (U+26A3)

Male/female: ⚥(U+26A5) / ⚤ (U+26A4)

Transgender: ⚧ (U+26A7)

Clock/time: Timer (U+23F2)  / Alarm clock (U+23F0)

And perhaps one of the clock faces (U+1F550 - U+1F567)

  • I'm asking to support ♂ in my source code and it ending up as ♂ on the watch. Right now it doesn't. 

     

    Sys.println("Unicode snowman ☃");
    Sys.println("Unicode heart ☃");
    Sys.println("Unicode female ♀");
    Sys.println("Unicode male ♂");
    Sys.println("Unicode male/female ⚥");
    Sys.println("Unicode transgender ⚧");
    Sys.println("Unicode clock 🕑");
    
    // yields
    Unicode snowman ???
    Unicode heart ???
    Unicode female ???
    Unicode male ???
    Unicode male/female ???
    Unicode transgender ???
    Unicode clock ????
    
    // On the watch is either shows as a question mark or as some blank string.

    Or some other way to send code points so it ends up as a glyph on my screen or watch.

  • MonkeyC Strings are UTF-8, so they support any legal UTF-8 sequence. It seems you are specifically asking for font support for emoji? Some devices have emoji for some of the fonts that they provide, but there is a known issue that the ConnectIQ simulator doesn't properly reproduce them.

    I realize it isn't exactly what you are looking for when you filed this request, but you should be able to create a custom font with the characters/emoji that you want using BMFont. That should work, but it does require some work on your side.

  • To start with maybe it would be useful to have the available glyphs documented. I mean where (GCM, GE, CIQ, which watches) which glyphs are available.