y-a-v-a / node-gd

🎨 GD graphics library (libgd) C++ bindings for Node.js.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

library an't support some language like arabic

Mifayo opened this issue · comments

i have a app who screens some images with text
but i when lang is arabic it scans text like [????????????]
any help here

hi thanks for reaching out. Have you verified wether the font you are using supports arabic characters? Regards Vincent

@Mifayo any progress on this? Is this still an issue or was it solved by using a richer font?

Too long no response, so closing...

sorry about late response
i didn't have time to test it
i'll try this days and will give you my feedback

Hi sorry for being late i was working on big project so i didn't have the time
now i did try your solution but it flips the word
example:
فيصل
become
ل ي ص ف

Hi, thanks for reaching out again.
I've been looking into this and I doubt whether it's an issue with node-gd, and rather an issue for libgd. I've been reading their code responsible for character rendering here: https://github.com/libgd/libgd/blob/748578ff3fa4b636513373f0613e158b930f3ed4/src/gdft.c but I do not understand how and if it would render rtl-scripts correctly. FreeType on the other hand suggests it does support rtl as stated here: https://www.freetype.org/freetype2/docs/glyphs/glyphs-5.html#section-4
Before creating an issue with libgd, I would suggest to create some test cases in node-gd to see if we can confirm their lack of support of rtl-rendering, and then supply that info to them.
Regards,
Vincent