SourceForge has been redesigned. Learn more.

#16 Some letters with tashkeel are rendered incorrectly

Said Bakr

Class: I18N_Arabic_Glyphs, utf8Glyphs method renders some letters have tashkeel incorrectly with GD. A life example of the issue, available on the following URL:
Where the characters of the word لَا are rendered as لَلا in the image.
The string source is the MySQL database of Quran offered by

The method printout the string without Tashkeel correctly.


  • Khaled Al-Shamaa

    • assigned_to: nobody --> kshamaa
  • Said Bakr

    Said Bakr - 2012-04-23

    I noticed that when I change ل In line 271 of Glyphs.php to ﻻ where (ﻻ = b button of the keboard in Arabic layout) it fixes the issue, but I don't know other side effects for this change. The following code is what I have done:

    if ($prevChar == 'ﻻ' && (mb_strpos('آأإا', $crntChar) !== false)) {
    if (mb_strpos($this->_prevLink, $chars[$i - 2]) !== false) {

    $output .= '&#x'.$this->getGlyphs($prevChar.$crntChar, $form).';';
    $nextChar = $prevChar;

  • Khaled Al-Shamaa

    Dear Said Bakr, thanks to find this bug and all efforts you pay to fix it, I will check your advice then back to you, could you please send me your email address?

  • Said Bakr

    Said Bakr - 2012-09-24

    The same problem is the same with the new version 3.5.0

  • Khaled Al-Shamaa

    It has some other side effects, so it is scheduled to be release in the version 3.6.0 which includes so many fixes in Hijri Date and Mktime, Query, Numbers, and Glyphs so far!

    Sorry to be late but it has to be as clean fix as possible.