Ticket Created
over 4 years ago

WERETECH-9191

Arabic, Hebrew and Thai Fonts Broken in Simulator

I've just gone through the process of internationalising a DataField app to all the available languages and in testing I found that a label I'd drawn to the screen is broken (at least in the simulator) when rendered with text from the FONT_XTINY font when the language is set to Arabic, Hebrew or Thai. I used Google Translate to convert my text from English and saved the output strings in a resource XML file. The project compiles without warnings, but renders garbled nonsense to the screen. In the case of Thai, passing the string to createField in the data field (as the units of a FitContributor field) also crashes the app. If there's a special way these languages need to be stored in the resource file, it's not documented in the programmer's guide as far as I can tell. I've disabled support for these languages for now as they seem unstable in the simulator.

  • The diamonds are an indication that the characters your trying to display aren't available.  What if you sideload to a device and switch to those langues?  the 3.1.9 SDK?

    (fonts in the sim are different than fonts used by java/etc and are actually part of the SDK)

  • Yeah sorry, "garbled" wasn't a particularly helpful description Slight smile 

    Here are some screenshots taken from the simulator, along with the strings XML used to create the text seen on the screen. It probably isn't a coincidence that the languages I'm seeing this behaviour in are RTL (except for Thai, which definitely isn't). However, strings created in the exact same way work perfectly in the simulator's "App settings" pages, so that makes me think perhaps it is a bug in the simulator's presentation of those languages. It can definitely show other UTF-8 characters (Chinese and Japanese work fine, for example). Not sure if it happens on the watch itself - I'm not sure I dare change my watch to Arabic and then try to change it back again by reading Arabic menus!

    Arabic:

    <strings>
      <string id="pace">سرعة</string>
      <string id="timer">عداد</string>
    </strings>

    Arabic

    Hebrew:

    <strings>
      <string id="pace">לִפְסוֹעַ</string>
      <string id="timer">שָׁעוֹן עֶצֶר</string>
    </strings>

    Hebrew

    Thai:

    <strings>
      <string id="pace">ก้าว</string>
      <string id="timer">เวลา</string>
    </strings>

    Thai

  • "garbled" can mean different this, so in something like this it's goof to include a screen shot from the sim along with the string(s) you're wanting to display.

  • Not sure about Thai, but I'm pretty sure Arabic and Hebrew are right to left, while English (and many other) are left to right.  Could that be what you're seeing?