Community Project: Minimum chars to display multi-language dates using custom fonts

Background:
Inside a CIQ app, date information like month and day-of-the-week names are automatically translated to the selected device language (set by the user when first setting up a device).
When using the built-in fonts available in CIQ, these names are correctly displayed.
Garmin already has all the required characters for languages built into these fonts.

Problem:
When using a custom font, it is the developer's responsibility to ensure that the correct set of characters for a particular language is included in the font.
The problem is that it is difficult to know which characters are required for all the different languages supported by Garmin.
As far as my knowledge stretches, there is no specific documentation that supplies information about the minimum set of date related characters per language.

In the past I tried to import all characters from a computer font file, but always ran into out of memory issues. Obviously the majority of these characters are not needed for dates.

The workaround is to
  • either force the display of date related names to a subset of languages that you choose to support for your app,
  • or to resort back to using the built-in fonts in CIQ.
Unfortunately I ran into a scenario where the size of the built-in fonts provided on the fenix5 and 935 watches are just not working for me.
TINY and XTINY for example are just not tiny enough to my liking.
So I would like to build my own real tiny font for these devices, but still be able to display dates in any of the Garmin supported languages.

I'm sure most of us have run into this issue at some point, but either have too little information or time to sit and build a complete set of characters required to achieve the same result as built-in fonts.

Things to be considered:
  • Displaying of both long and short names. Would be great if we could indicate which characters are sufficient for short names only, and which characters should be included to display full names (e.g. Mon vs Monday and Dec vs December). This way developers choosing to display short names can build a smaller font, but when deciding later to display full names, they know which characters to include.
  • The same for casing, it would be great knowing the uppercase vs lowercase set of characters, for example if you choose to display short names starting with uppercase followed by lower case, as opposed to showing everything in all lower case or all upper case.
Examples:

English short names:
Mon
Tue
Wed
Thur
Fri
Sat
Sun

a,d,e,F,h,i,M,n,o,r,S,t,T,u,W (the only characters required to display short English day-of-the-week names)

English full name as an extension to short names:

[Mon] day
[Tue] sday
[Wed] nesday
[Thur] sday
[Fri] day
[Sat] urday
[Sun] day

s,y (the only characters required to to display full English day-of-the-week names)

Request:
I cannot do this on my own, and would like to know if there would be interest to help contribute towards this as a community / open source project?
This way developers with knowledge about different languages can easily contribute and the workload be spread more evenly.
I am hoping to set up a public github project with some structures and guidelines about how to contribute.
For those not knowing github, I would be willing to receive emails or forum post with details of your particular language contributions and then work that into the open source project.
It all depends on the interest and willingness of others to contribute whether I will start a project of this magnitude.

Please respond with some ideas and suggestions and wether you are interested or you think it might not be worth it?
  • You can find the set of chars per language in the attached file.
    Use this for example if you wish to specify the filter in your font resource file for a particular language.

  • Nice job, Hermo! Some fantastic ingenuity here. :)
  • Brandon.ConnectIQ I discovered something odd and it is really confusing:

    I was trying to get the date displayed with arabic characters from my custom font.
    But it always display blocks, as if unable to find the characters in the font.
    I verified all the font files and the filter and ensured that the font.xml is saved in UTF-8. Most other languages with special chars display just fine, so the encoding and filter is definitely fine.

    Then in the Programmer's guide I later discovered that there is no qualifier for arabic, which tells me it is probably not supported. Is this true?
    There is also no qualifier for hebrew, yet when I set the language to hebrew, it does display the date in hebrew using the custom font.

    I am confused about what is supported or not and why my arabic chars don't display.

    Can you shed some light on this please?
  • And to further add to the confusion...the simulator shows Arabic and Hebrew under languages...:confused:
  • I stumbled on this post saying that ConnectIQ supports arabic
    https://forums.garmin.com/forum/deve...ble#post135815

    Yet I cannot get it to work.
  • So I have been doing some tests, and it seems there is some issue with the following range of chars in my .fnt file, which is basically all arabic chars I need except for 1569 which renders just fine. The highlighted chars all display blocks on the device in both simulator and real device.



  • I'm not sure about this... Arabic fonts should be supported. I'll loop in one of the other guys that knows more about fonts than I do.
  • I have a little feedback on this:
    • Perhaps the device you're using doesn't support Arabic fonts. In that case, we should probably disable that font option in the simulator.
    • The right-to-left language support may be suspect here. It's possible our font converter isn't behaving properly for these types of languages.
    • Since you're getting one character to display, that suggests there may be more going on here that needs investigation. I'll file a ticket to have this looked at more closely.
  • Perhaps the device you're using doesn't support Arabic fonts. In that case, we should probably disable that font option in the simulator.

    It does support it. The arabic language is in the settings and selecting that changes everything to arabic on the watch. It has the arabic.ln3 file in the Text folder. Had to first memorize the sequence of button presses to restore the language back to English ;)

    The right-to-left language support may be suspect here. It's possible our font converter isn't behaving properly for these types of languages.

    But Hebrew seem to work fine with my custom font, also a right to left font.

    Since you're getting one character to display, that suggests there may be more going on here that needs investigation. I'll file a ticket to have this looked at more closely.


    Thanks Brandon!
  • Brandon.ConnectIQ Any news on this?
    I can create a bug report for this in the bug forum if you prefer?