-
-
Notifications
You must be signed in to change notification settings - Fork 704
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
Unwanted line-breaks in bold text #288
Comments
I can't reproduce the bug with simple HTML samples like this one: <ol>
<li>
sietua netunars etunare itunr itnause eitu netauie tnauiet rnauetn
<strong>etasnui tenrau etnrsauet nrauet nrauet</strong> sitenaurset
auiret nauietnrau et Could you please provide the HTML and CSS used in your examples? |
See uploaded xx.zip file |
Where is a related (unit)test? How can you ensure that there will not be 2016-01-01 19:37 GMT+01:00 Guillaume Ayoub [email protected]:
|
Thank you for your gratitude. WeasyPrint has tests, covering 94% of the code. These tests are launched for each commit with 6 different versions of Python, on Travis. That's all I have to offer as a "concept of quality control". Writing tests is sometimes hard and long, especially for text-related features of WeasyPrint. For example, I had no layout problem with your sample page, because I don't have Droid or Calibri installed. I had to change random characters to get your problem. We can use a special font and rely on it to test some features. Actually, that's what we do: we use Ahem, a font specially crafted for tests. It helps, it makes writing some tests go from impossible to quite hard. But it's sometimes not enough: the test testing 'font-stretch' doesn't work on my computer because the default font used for tests has no condensed variant. I could take the time to create a condensed font. I just don't want to. I prefer spending this time with my family. And that's sometimes not only a problem of time. This particular bug was caused by a hack introduced because of hinting problems. The way how hinting is done depends on your OS, the versions of the font rendering libraries installed, and your personnal font rendering settings. On some systems, it may even depend on the screens plugged to the device, and on the orientation of these screens. So, if there's a reliable way to test hinting-related features for all the versions of the font-rendering libraries installed on these computers, I'd be happy to know it. I've already tried hard, please believe me. But I don't know it yet, making some non-regression tests just impossible to write for me. If you're interested in WeasyPrint, including in its quality, I'll be really happy to spend some time fixing the bugs you report (even on January 1st), reading your pull requests, merging them and answering your questions. I'd love to see WeasyPrint become better. I'll spend time writing code and tests for free. But I won't be the person writing a test each time a bug is found. |
Version 0.26 ------------ Released on 2016-01-29. New features: * Support the `empty-cells` attribute. * Respect table, column and cell widths. Bug fixes: * `#172: <https://github.com/Kozea/WeasyPrint/issues/172>`_: Unable to set table column width on tables td's. * `#151: <https://github.com/Kozea/WeasyPrint/issues/151>`_: Table background colour bleeds beyond table cell boundaries. * `#260: <https://github.com/Kozea/WeasyPrint/issues/260>`_: TypeError: unsupported operand type(s) for +: 'float' and 'str'. * `#288: <https://github.com/Kozea/WeasyPrint/issues/288>`_: Unwanted line-breaks in bold text. * `#286: <https://github.com/Kozea/WeasyPrint/issues/286>`_: AttributeError: 'Namespace' object has no attribute 'attachments'.
Fix #325 and shouldn't reopen #288. Now that fac5ee9 fixes line-cutting bug when drawing, we can use a much lower relative tolerance inspired from PEP 485 (1e-9 instead of 1e-3). Tests have been added with random values, as results highly depend on the version of Pango used and on hinting properties depending on the system used to launch the tests. They are probably longer than required, but they try hard to prevent #288 and #325 from coming back.
See the attached PDF/screenshot. There is an unwanted line break in the last row of table - likely to the fact that the text is marked as span.bold.
xx.zip
The text was updated successfully, but these errors were encountered: