Ticket Created
over 4 years ago

WERETECH-10093

Custom font with filter fails with Arabic

I'm trying to use a custom font with Arabic characters.

In my resources.xml I have a font with a filter:

<font id="id_font_small" filename="fonts/ArslanWessam18.fnt" antialias="true" filter="واحدة" />

In the code, I print out a string:

 dc.drawText(x, y, font, "واحدة", Graphics.TEXT_JUSTIFY_CENTER | Graphics.TEXT_JUSTIFY_VCENTER);

When I compile the project, I get the following error from the SDK:

ERROR: Font 'ArslanWessam' does not have characters in the given filter 'واحدة'.

If I remove the filter attribute from resources.xml, the project compiles without issues and the string is printed OK. (A pretty good indication that the characters do exist in the font file.

You can get the code from https://github.com/samuelmr/garmin-arabic

The filtering works in e.g. Hebrew (also a right-to-left language). Why do I get the error in Arabic?