-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Asslamu Allikum,
First thank you all for the excellent effort on this project.
Second, I am trying to use the Quran Tajweed direct without the JS library, I used the text database file
and inserted it into a mysql database no problem.
I am able to parse the Tajweed tags based on the JS code GlobalQuran.js:
parseTajweed: function(a, b) { return b.replace(/\[h/g, '<span class="ham_wasl" title="Hamzat Wasl" alt="').replace(/\[s/g, '<span class="slnt" title="Silent" alt="').replace(/\[l/g, '<span class="slnt" title="Lam Shamsiyyah" alt="').replace(/\[n/g, '<span class="madda_normal" title="Normal Prolongation: 2 Vowels" alt="').replace(/\[p/g, '<span class="madda_permissible" title="Permissible Prolongation: 2, 4, 6 Vowels" alt="').replace(/\[m/g, '<span class="madda_necessary" title="Necessary Prolongation: 6 Vowels" alt="').replace(/\[q/g, '<span class="qlq" title="Qalqalah" alt="').replace(/\[o/g, '<span class="madda_obligatory" title="Obligatory Prolongation: 4-5 Vowels" alt="').replace(/\[c/g, '<span class="ikhf_shfw" title="Ikhfa\' Shafawi - With Meem" alt="').replace(/\[f/g, '<span class="ikhf" title="Ikhfa\'" alt="').replace(/\[w/g, '<span class="idghm_shfw" title="Idgham Shafawi - With Meem" alt="').replace(/\[i/g, '<span class="iqlb" title="Iqlab" alt="').replace(/\[a/g, '<span class="idgh_ghn" title="Idgham - With Ghunnah" alt="').replace(/\[u/g, '<span class="idgh_w_ghn" title="Idgham - Without Ghunnah" alt="').replace(/\[d/g, '<span class="idgh_mus" title="Idgham - Mutajanisayn" alt="').replace(/\[b/g, '<span class="idgh_mus" title="Idgham - Mutaqaribayn" alt="').replace(/\[g/g, '<span class="ghn" title="Ghunnah: 2 Vowels" alt="').replace(/\[/g, '" >').replace(/\]/g, "</span>") },
This works very nice on Firefox browsers. On Chrome and WebKit based browser the letters are not
joined and each letter of tajweed letters looks as a standalone separate letter. This is because the span tag added in place of the tajweed tags. I know this is a Chrome/Webkit bug and I did research online and everyone is recommended using the zero width joining entity:
‍
Now the issue is we need a rules on parsing the Tajweed words/tags to insert this zero width joining letter, that's decide if the letter is at the begaining of the word, end of the word, letter next to it etc.
The question does anyone have these rules to fix this.
During my search online I found a website applying this but seems server side:
http://www.mosshaf.com/ar/main
Tajweed version is very important to include this zero width joining tag built in instead of parsing as Chrome / Webkit browsers are widely used specially on Android and Mobile devices, over 90% now using mobiles to access websites specially for such purposes reading quran and learning.