Thanks for your kind reply. I have searched A LOT, and all I found was custom functions to do so. However persian letters unlike Latin letters should be connected. For example in the word ‘Hello’ there is a space in between ‘H’ and ‘e’, in the same word in persian, which is ‘سلام’, the first letter ‘س’ is connected to ‘ل’. To do this we have to replace the letters with the correct connected symbol to do the trick. Using this approach when applying different fonts to our word, the letters that we replaced with their connected symbol are written in an ugly font. I was wondering if there was an extension or library to install and handle this using GD.