"glyph dsc. not found" Error when adding an arabic font

Thank you very much Mr @robekras.
Are you suggesting trying out another font or what?

and can I ask you about the way of getting the Unicode ranges from the ttf file?
really looking for a shortcut.

would the converter work If I just put the full range?
shouldn’t I just enter the existing unicodes in the font.ttf file?

In range setting, I’ve taken the full range (0 - 0xffff), then you get some single ranges in the resulting c-file.
I’ve taken the characters which are preceeding the
glyph data as a c-comment and entered it into notepad++.
In notepad++ I observed, that when I copy and pasted the arabic character to the end of the line (at the right most position), it was added to the end of the arabic line which is in LTR the left most position. Also a little bit strange!

I think, that issue needs a debugging session.

1 Like

Is this problem related to this font only or what :face_with_raised_eyebrow::face_with_raised_eyebrow:
@robekras

And can you elaborate on the problem you encountered.
What line was the Arabic letters in a LTR?

Don’t know. I havn’t checked any other font so far.

Can you show your output?

I am a bit confused about what the issue is here. The builtin DejaVu Hebrew font includes the following ranges:

0x20-0x7f,0x5d0-0x5ea,0x600-0x6FF,0xFB50-0xFDFF,0xFE70-0xFEFF

If the characters you are trying to use are there, could you try it (use &lv_font_dejavu_16_persian_hebrew as the font) to see if it’s an issue with Arabic font rendering in general or just your specific font?

1 Like

I tried it today with UniFont, converted the range 0x0-0x074f to C, and tried to output some arabic characters “يحكبةت” to a button label.
There is not one character shown!
When the string is “helloيحكبةت”, just the hello is shown.

So it seems to be font independent.

1 Like

Hi @alsaleem00 did you managed to make it work with Arabic letters before?
Can you send the font you used?
Would you upload the C format of it also please?

I agree with embeddedt
Yes. I am actually using the (lv_font_dejavu_16_persian_hebrew) that comes with lvgl code. It is displaying Arabic correctly “with” contextual.
Please try it first. If it goes well then you move to ReemKufi.
Please see thread i mentioned on how to use it with label.

Some more infos:

I tried it today on real embedded hardware, not only on VS simulation.
Arabic characters are shown on my display!

Seems to be a problem of VS!?

My IDE is eclipse (and in addition I use notepad++ sometimes).
Arabic characters are shown in both editors the same and in RTL.
But eclipse needs UTF-8 with BOM! (Maybe VS needs BOM too?)
Except notepad++ (at least the version I’m running) has a little problem with correct insertion position when I paste a character into an RTL string.
The arabic strings are shown in notepad++ and eclipse in RTL, within my lvgl driven display it’s LTR. Does it need a specific setting?

The source file format matters, otherwise the C compiler inserts the wrong character codes and LVGL doesn’t know what to do with them.

thanks all for your time and efforts really appreciate it.
Many thanks
I solved the problem with VS and it goes like this.
you close the file and reopen it from the solution explorer by clicking right button and choosing open with
then this window will pop up
image
you should choose the selected option not the default one then OK.
and then choose auto-detect and that would solve the problem.

that being said

I am still facing a problem with the same font as It seems like there are no glyphs for the different positioning of the Arabic letters which is weird
because every online website offers you to test the font online and it works fine.
but I can’t get those letters in the .ttf file, their ranges are empty.

in another words
I only can output individual letter

أ ه ل ا

not a whole word

أهلا

but the lv_font_dejavu_16_persian_hebrew
works fine

yes, look up at the lv_confg.h file for the LV_USE_BIDI macro and set it to 1

you can test the font yourself at google Fonts here

The DejaVu Hebrew font is converted using the following settings:

--size 16 -o lv_font_dejavu_16_persian_hebrew.c --bpp 4 --font DejaVuSans.ttf -r 0x20-0x7f,0x5d0-0x5ea,0x600-0x6FF,0xFB50-0xFDFF,0xFE70-0xFEFF

As long as you are using the exact same range it should work identically (unless TTF fonts store information about how to combine the letters??).

I don’t think the problem is in the ranges anymore, it is in the .ttf file it self
It doesn’t contain the ranges for the different shapes of letters Arabic Presentation Forms-B.
you can check it at https://fontdrop.info/
the site shows the glyphs with a Unicode of none :frowning:
but the type yourself option works fine despite that.
image

I don’t know how they work, this is my first time to encounter the .ttf files,
So I don’t get what you mean with the font stores information about how to combine the letters.

I just talked with the font developer and he stated that it is an open type font and having an open type engine is a must to be able to use it.
what a shame it is a very beautiful font.
and it has already all of the glyphs just not associated with the unicodes.
image

Finally, Got the Font fixed using FontForge
image
and here is the font file if anyone interested in the same font.
ReemKufi-Regular.zip (31.4 KB)
Thanks All. <3