As explained in the previous article, WeasyPrint has been improved in different fields:
- performance with improved speed and document size,
- columns can be finely managed and are more solid in many corner cases,
- shorthand properties handle the
- text decoration is correctly applied for nested values,
- embedded fonts are smaller and have nice names,
- absolute boxes are correctly positioned in right-to-left,
- SVG images got new tests and small fixes.
✨ That’s nice, isn’t it? ✨
A lot of work has been done for these features, for sure, but that’s only the tip of the iceberg: apart from these visible improvements, we tirelessly continue to work on more obscure (but not less important) topics.
Tests are a good example of these invisible tasks. 31 issues have been closed, but fixing bugs is not enough: we have to test fixed cases, so that bugs don’t come back. Non-regression tests are really important to have the proof that the bug is actually fixed, and to detect future problems that may be involuntary introduced.
We also have to prevent new bugs 🐞 from appearing. That’s why we regularly add tests to cover more and more corner cases. Finding code that’s not covered by tests is a good way to find bugs: code that’s tested doesn’t necessarily work, but code that’s not tested is undoubtedly rotting with time!
The number of tests (including unit tests, non-regression tests, style guide tests, etc.) has increased from 1,861 to 1,969 between versions 54 and 55, but we’re lucid: having more code for tests than for WeasyPrint itself (yes, really) doesn’t prevent users from finding bugs! However, we also know that this work is important to keep a high quality of code and give our users the best experience when they update WeasyPrint.
What’s Coming Next?
Footnotes, rendering speed and smaller PDFs were among the most important topics for our users. We have worked on this during the previous versions, but it’s now time to work on the number one feature of this survey: grid layout.
Grid layout has been largely used since its official implementation in major browsers in 2017. The possibility to use a tabular presentation without using HTML tables is a great improvement for layout flexibility and semantic structure of the content, and having this feature will greatly help users to use the same layout for both their printed documents and their online pages.
Implementing the support of the grid layout will take time 🕓 (and hard work, including endless hours reading the specification 🔍), but we think that it’s the right moment: we will highly benefit from some the recent previous improvements, specifically from the new page-breaking possibilities for non-standard layouts.
This low-level work on the layout was important to be able to support grid, but it also gives nice possibilities for other out-of-the-flow layouts. Columns support has been largely improved in version 55 and will be improved again in version 56. And columns are not alone: Flexbox support, that has always been limited, will also be improved to reach the quality levels we want to provide.
Last but not least: the next version will also include features sponsored by some of our clients. Which features? That’s a surprise, stay tuned!
During our work on version 55, many bug fixes and features have been included thanks different clients who had specific needs for their projects. We’ve been glad to help them designing gorgeous documents and solve problems related to paged media. It’s always a pleasure to see that these improvements will benefit to all our users. We’re proud of this model of collaboration, and we’ll proudly continue to bring the best of our skills to companies that share these values.
We also want to thank our sponsors and our bakers. They really help us to spend the time needed to manage the everyday work: triaging issues, updating continuous integration, improving documentation, reviewing pull requests (kindly open by our lovely contributors 💜), etc. These tasks are really important to keep the project sane and clean! So, don’t hesitate to help us if you use WeasyPrint and like the work done so far; each financial contribution is important for us and for the future of the library.
Now that version 55 has been released, it’s time for you to update WeasyPrint! We really hope that you’ll enjoy the new features of this new version. Don’t hesitate to report bugs, ask for new features, or just say that everything works well for you … we’ll be happy to answer, as usual!