what i'm trying to achieve :loop an image into a video and overlay Arabic Text from the Qur'an on it including the text diacritical mark, using a custom font.
example of the text to be rendered:
بِسْمِٱللَّهِٱلرَّحْمَـٰنِٱلرَّحِيمِ
the font used :https://fonts.qurancomplex.gov.sa/wp02/wp-content/uploads/2024/01/UthmanicHafs_v22.zip
font's unicode module :
Unicode Module The Research and Development Unit in the Computer Department at King Fahd Glorious Qur’an Printing Complex relied on the unicode system unicode to create (Hafs) font in the Uthmanic Script, because this system is followed globally among computer and systems manufacturing companies in the world.Unicode organization is a global code group that is used to define all codes and letters used in most of the world's languages and gathered in one code to facilitate the presentation and delivery on information despite of the language used. This global coding uses 1 to 4 bytes (byte = 8 bits) to encode letters, and so far only a third of the number available in Unicode organization to encode the letters of these languages.Taking into account Hafs font with the Uthmanic Script, which was built entirely on the unicode system. We can explore the basic letters that were formed according to the following figure:Whereas the font was developed starting from code (0600 ) to code (066FF ) Taking into account there are several encoded letters that haven't been used at all so it was replaces with the code []. The displayed copy above is the one that is been developed from the basic Arabic coding (0600-06FF) which was updated by Unicode organization in 2009.
expected result :exported video with correctly rendered text using the given font.
actual result :the text rendered contains only the diacritical marks ( which are the accents on top of the letters ) without the actual letters.
what i tried :this is my test command which exports just an image for faster results:
Ffmpeg -loop 1 -i "image-2.jpg" -vf "drawtext=text='بِسْمِٱللَّهِٱلرَّحْمَـٰنِٱلرَّحِيمِ':fontsize=124:fontcolor=white:fontfile='UthmanicHafsV22.ttf':x=(w-text_w)/2:y=(h-text_h)/2" -frames:v 1 "output.png"
- tried adding ft_load_flags , almost tried all of them
- tried text_shaping=1 , with no success
- tried textfile instead of text
- tried changing the font, any font i try with it always have different problems, either some squares instead of the diacritical mark
p.s im having same results on both latest ffmpeg compiled by myself on macos terminal with all required libraries enabled , and also on flutter ffmpeg kit full gpl