Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

print Persian/Arabic letters and numeral #2416

Open
HoseinSL opened this issue Apr 4, 2024 · 3 comments
Open

print Persian/Arabic letters and numeral #2416

HoseinSL opened this issue Apr 4, 2024 · 3 comments

Comments

@HoseinSL
Copy link

HoseinSL commented Apr 4, 2024

Hi, I use the U8G2 library on STM32, how do I write Persian/Arabic letters and numerals on the display?
I used the below code to print the "سلام" string on display, but it printed on display like "س‌ل‌ا‌م".
What is the problem and how should I fix it?

u8g2_FirstPage(&u8g2);
do
{
u8g2_SetFont(&u8g2, u8g2_font_iranian_sans_12_t_all);
u8g2_DrawUTF8(&u8g2, 40, 10, "سلام");
} while (u8g2_NextPage(&u8g2));

@olikraus
Copy link
Owner

This is a difficult issue. It had been discussed multiple times, but as of now there is no proper solution in u8g2 itself. I suggest to look into the existing issues, maybe there is something useful.

https://github.com/olikraus/u8g2/issues?q=is%3Aissue+arabic

Especially: #640, #529, #1015

@korsehindi
Copy link

These may also be useful.
+ , +

@olikraus
Copy link
Owner

Nice, thanks for the feedback (link repeated: https://github.com/idreamsi/u8g2-persian-reshaper)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants