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
Add font support for Arabic font 'Tajawal' #683
Comments
@YDA93 Thanks for the report. Unfortunately, there is no active community maintaining this project, so if you would like to have this font supported, you would likely have to to provide a contribution yourself. In the meantime, I'd suggest you try out "MarkaziText", which is mentioned in the docs, or "DejaVu", which has proven to be working in one of my projects... |
@timoludwig I would surely love to contribute and fix this, I only need some guidance on how this can be done? |
Sadly, I'm not quite familiar with all the internals, maybe @luisza can give a hint in the right direction? |
Hello, I think using "body dir="rtl"" could have a positive effect. In case you want to develop it, I'm attaching the lines where the change of letter direction is made. I don't use rtl as such, so clear examples of what should happen using fonts supported by reportlab could help give an idea of how an html code with rtl should turn out. xhtml2pdf/xhtml2pdf/context.py Line 436 in 9e3c88a
xhtml2pdf/xhtml2pdf/reportlab_paragraph.py Line 425 in 35014fc
xhtml2pdf/xhtml2pdf/reportlab_paragraph.py Line 1253 in 35014fc
|
Describe the Bug
'Tajawal' is a Google font which unfortunately cannot be rendered perfectly.
Minimal Example to Reproduce
Expected Behavior
Should render any character normally just like Google font 'Amiri'
Actual Behavior
Some characters does not work:
System Information
OS version: macOS 13.3.1 (22E261)
Python version: 3.10.11
XHTML2PDF version: 0.2.9
The text was updated successfully, but these errors were encountered: