fpdf2 icon indicating copy to clipboard operation
fpdf2 copied to clipboard

Fixing: bullet/top_margin combo & width of indented paragraphs & some HTML bugs

Open gmischler opened this issue 1 year ago • 0 comments

Fixes:

  • paragraph top_margin was ignored in the presence of a bullet (see discussion in #1217)
  • indented paragraphs weren't made narrower, but the whole paragraph just shifted to the right.
  • Converting legacy _ln() for <li> to top_margin value in html.py. Some HTML tests need a t_margin value added to their TextStyle to avoid automatic empty lines in _new_paragraph().
  • While testing the previous item, it became obvious that the ln() of the text regions didn't always do what it is supposed to do with an explicit height given. This resulted in the "2mm" specification to simply be ignored, so that the layout of lists will now include a slightly wider gap, as was initially intended.

Checklist:

  • [ ] The GitHub pipeline is OK (green), meaning that both pylint (static code analyzer) and black (code formatter) are happy with the changes of this PR.
  • [x] A unit test is covering the code added / modified by this PR
  • [ ] This PR is ready to be merged
  • [NA] In case of a new feature, docstrings have been added, with also some documentation in the docs/ folder
  • [ ] A mention of the change is present in CHANGELOG.md

By submitting this pull request, I confirm that my contribution is made under the terms of the GNU LGPL 3.0 license.

gmischler avatar Jul 06 '24 10:07 gmischler