quran / quran.com-api

Quran.com content APIs
https://api-docs.quran.foundation/docs/category/content-apis
MIT License
923 stars 192 forks source link

Quran uthmani script font problem #299

Closed ngekoding closed 2 years ago

ngekoding commented 3 years ago

Trying to use Uthmanic Script as mentioned from my last question (ref: https://github.com/quran/quran.com-api/issues/291#issuecomment-774388289)

But I got new problem, some character not rendered correctly as shown below.

font problem with uthmanic script

I use KFGQPC Uthmanic Script HAFS Regular font, I download it from here https://arabicfonts.net/fonts/kfgqpc-uthmanic-script-hafs-regular

I try to use another font, like me_quran, that problem gone, but some ayah too difficult to read.

Any idea/solution?

Thanks in advance

benomaire commented 3 years ago

Since you are using the font by King Fahd Glorious Quran Printing Complex, you have to use the script that they publish with their font. AFAIK, you will see these black circles if you use any other Uthmanic script.

I highly recommend that you download the font and the script directly from their official website: https://qurancomplex.gov.sa/techquran/dev/ Look for:

خط الرسم العثماني (رواية حفص) Unicode Uthmanic Font (Hafs Riwaiah)

Currently version 17 is published, so you will get a zip file named: UthmanicHafs_v17.zip. But you will need to check their website once in a while to see if they release an update. (The script is thoroughly reviewed, but the updates usually address some rendering issue by X device or app).

There is another set of fonts (604 fonts) that always render right, but they take up more space. You can get them from the nashr application by KFGQPC: https://nashr.qurancomplex.gov.sa/site/

One good option is to use the 604 fonts for presenting the Ayah text on screen, and use the api to copy the Ayah text to other apps (if you implement a copy feature). جزاكم الله خيرا