Open 2S-Software opened 7 months ago
Looks good to me. Please provide an implementation PR.
Hi David Thank you for your positive response. I will gladly prepare a push request. However, this is the first time that I will be returning a PR via a fork. I may therefore need some support...
My first question is, where do I get the missing font files from so that all Golden tests work successfully? 9 of 166 tests are failing because following fonts are missing: hacen-tunisia.ttf, noto-sans.ttf, genyomintw.ttf and material.ttf. Unfortunately, I couldn't find it on the Google Font page.
Thanks for your support. Stefan
THe font files and other assets are downloaded using the makefile.
usually you just run make
on Linux. On macOS and Windows you might need to install that program.
any update?
Use Case
I only want to execute a page break if the free space of the page is less than e.g. 50mm:
Would it be possible to add a new parameter 'freeSpace' to the existing widget NewPage so that the page break is only executed if the free space is less than specified?
The default value of the new double parameter should be Null or Zero, so that in this case a page break is always generated as before.
Possible implementation idea
I had tried to derive my own widget class of NewPage, but the offsetStart and fullConstraints infos are missing. Perhaps the base class pw.Widget can be enhanced with a function 'newPageNeeded' (with the available space as a parameter). NewPage could then override this new function and would replace the following code in MultiPage.generate in a more generic way:
Existing:
New: