-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dompdf Urdu Words Not Joining Issue #3091
Comments
Dompdf does not currently perform any kind of complex text layout operations (such as shaping/joining). You would need to pre-process your text through some other means prior to rendering. |
Basically these are not shap's or anything other then Urdu language! Load font and showing exactly the same font language is possible in dompdf? other pdf libraries are working fine only dompdf is having such issue. |
You misunderstand, and may be surprised to know that the joining of the characters doesn't just happen automatically. Shaping is a process by which a program takes the input character string and performs sufficient operations so that the resulting visible text is rendered correctly. The program generating a document has to have embedded in it sufficient logic about how to format a language to render it correctly. Unfortunately, at this time, Dompdf does not have that information. If you're interested in more information on the subject you can start with Wikipedia: Complex text layout. |
@bsweeney thanks for reference the document I'm facing same kind of issue with tamil script unable to render complex layout characters Is there any way to add some call back to take over the ctl part and send the correct text to be writable in pdf rendering Example : $rawUtf8Text="தமிழ் கணிணி பொறியாளன்"; function handleCTL($rawUTF8Text) return $processedUTF8data; } |
I don't really have an answer at this time since I have not had an opportunity to research the issue more thoroughly. |
If tc-lib-unicode is used to add language support for arabic bidirectional and rtl I'll try to implement Tamil font character mapping for tamil using tc-lib-unicode |
You can check out #2107 for a tweak to Dompdf that includes tc-lib-unicode. The branch had some issues rendering text that was multi-line and/or used inline elements so it hasn't moved forward. I'm not sure what language support tc-lib-unicode has. I haven't fully reviewed the code but the shaping logic has a specific class for Arabic and nothing else. |
Font is loading but characters are separated tried so many other URDU language fonts like zoya font, noto_nastaliq_urdu font but nothing worked.
My complete code is
screenshot
The text was updated successfully, but these errors were encountered: