Open jamma313 opened 11 years ago
There is no RTL support in WeasyPrint. It kinda seems to work on uninterrupted text runs as a side-effect of using Pango, but that’s not nearly enough to do anything useful.
It’s definitely something that we want to have eventually, but it’s a lot of work and there is currently no plan for doing it. But Kozea will probably be happy to chat with whoever wants to contribute one way or another.
We still want to track feature requests.
Hi, RTL support, Please
Thanks
Hey, any rtl support is planned soon?
Hey, any rtl support is planned soon?
Adding RTL and BiDi support will be possible after rewriting the line breaking algorithm (#301), which is explained in Fragmentation Module and in Text Module.
That's huge.
Secret breaking news: implementing the breaking rules and adding rtl/bidi support is on my short list for 2018. It'll come with dropping Python 2 support and releasing 1.0.0. Maybe.
Thank you very much! I will look forward to it.
According to some brief tests with 0.42, RTL/BIDI supports seems to be pretty decent.
thank you very much!
בתאריך יום ו׳, 23 במרץ 2018, 18:34, מאת mustafa0x <notifications@github.com
:
According to some brief tests with 0.42, RTL/BIDI supports seems to be pretty decent.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Kozea/WeasyPrint/issues/106#issuecomment-375704958, or mute the thread https://github.com/notifications/unsubscribe-auth/ASmVfxySwUL7PtNmxht7ktjqtDJnbzfmks5thRXggaJpZM4AyeAo .
According to some brief tests with 0.42, RTL/BIDI supports seems to be pretty decent.
RTL suppot is not that bad for simple use cases and will probably be quite good in version 43.
Bidi is a much harder goal to reach. We'll have to open a separate issue when this one is closed.
It would be great if we could support
writing-mode: vertical-rl;
text-orientation: sideways-right;
This is the only way I've found to, in combination with
transform: rotate(180deg);
in English, make nice Y axis chart labels with correct text flow and line wrapping.
e.g.
@liZe Is there a way we can maybe chat or you can give me some guides on how to contribute to the RTL support ?
@mohdnajdy did you have any success in adding support for RTL to weasyprint?
@dumblob not really. I am still lost on where to contribute at for supporting RTL
I am still lost on where to contribute at for supporting RTL
It’s really hard to know where to start. git grep rtl
will give a few TODOs, but that’s a small part of the work needed.
Some parts are probably easier to fix: tables, list markers, flex blocks… The hard work is of course in inline blocks layout.
You can find failing tests related to RTL in WeasySuite (this page may take a long time to render). And, of course, we’ll need to write our own tests too.
Fixing RTL won’t mean that bidi is fixed. Supporting bidi would mean that we have our own implementation of the bidi algorithm and don’t rely on Pango’s one, as we have to handle line breaks with embedded tags. Yes, we would be able to drop Pango and use HarfBuzz instead, but that’s a lot of work…
And, of course, we’ll need to write our own tests too.
:bulb: Writing failing tests is actually a really good starting point. :bulb:
Hello again @liZe I would like to re-state the issue of the Arabic text in a p tag. As shown in the picture. And i would really love to solve it. So please can you guide me to where i should look for to solve this issue ? if there is a simple solution please let me know.
Hello again @liZe I would like to re-state the issue of the Arabic text in a p tag. As shown in the picture. And i would really love to solve it. So please can you guide me to where i should look for to solve this issue ? if there is a simple solution please let me know.
Hello again!
What’s wrong with this paragraph? I’m sorry, but as I don’t read Arabic it’s hard for me to spot the problem. If you have an HTML/CSS sample with the wrong rendering and an idea about what the right rendering is, it would be useful.
I think the issue of the Arabic text in the p tag is that the third line starts too much on the right compared to the previous ones
I think the issue of the Arabic text in the p tag is that the third line starts too much on the right compared to the previous ones
@liZe
as you can see the first 2 lines are correct. The last line is going more to the right.
as you can see the first 2 lines are correct. The last line is going more to the right.
Oh, OK 👓 !
I think that this problem is already fixed in master: see #1111.
@liZe great, Is there going to be a release date for the new version ?
Hello!
(The survey is now closed. Thanks for all your answers! We’ll share the results soon 😉)
If you’re interested in RTL and bidi support, we created a short survey where you can give a boost to this feature and help us to improve WeasyPrint 😉
Vote for it!
As an argument for better RTL support, WeasyPrint is used by IETF to generate PDFs of RFCs. RTL support is essential in some RFCs. For example, an internet draft on the way to becoming an RFC has issues with PDF rendering because of the WeasyPrint RTL support. Ref: https://mailarchive.ietf.org/arch/msg/auth48archive/_8ZjoHcPh5HfYxRQb3P4zVbdXUg/
Hello!
As it’s soon our 2-year anniversary as CourtBouillon, we opened a short survey to know more about your expectations. Don’t hesitate to support this feature and give it a boost 🚀!
The survey will be opened until October 10th.
Update: the survey is now closed. You can find the results here.
Hello!
As you may know, two weeks ago was CourtBouillon 3-year anniversary 🎉.
For this occasion, we prepared a short survey to have your opinion on this year’s features and to know what you’d like to see in the future! Don’t hesitate to give a boost to this feature ✨️
The survey is opened until November 19.
+1 for bidi support please.. I have a text that don't include RTL text but do numbers and special characters. I manage to get a PDF that displays the bidi text in the right way, but when I'm copying the text from the PDF to a notepad, some of the numbers are copied to the end of the sentence even that they exist in the beginning of it. For instance: [0:0:1 - 1:0:3], דובר 1: מה קורה? Copied as: 1:0:3 ]' דובר 1: מה קורה? - 1:0:3]
+1 for bidi support please.
We all want bidi support, help is appreciated!
but when I'm copying the text from the PDF to a notepad, some of the numbers are copied to the end of the sentence even that they exist in the beginning of it.
I’m not sure that it’s a problem in WeasyPrint then. If the layout is right but the copy-paste is wrong, it’s maybe because of the PDF reader.
If you have two simple PDF files with bidi, with the same layout but different copy-paste results, feel free to share so that we can study them.
I’m not sure that it’s a problem in WeasyPrint then. If the layout is right but the copy-paste is wrong, it’s maybe because of the PDF reader.
You are right, I've upgraded the web browser and seems it handles the copy-paste better (not perfect yet). Adobe reader handles this worse..
Hi,
What is the current status of weasyprint concerning rtl support ? It looks like it has a partial support (can display text but not boxes), is this a long way to finish it ?
Thanks.