cyphar / paperback

Paper backup generator suitable for long-term storage.
GNU General Public License v3.0
1.09k stars 40 forks source link

Switch to azul-text-layout #10

Open cyphar opened 2 years ago

cyphar commented 2 years ago

At the moment all of our text layout code is mostly hard-coded or calculated using somewhat loose approximations. In order to have nicely formatted text (and properly wrapped codewords) we need to switch to azul-text-layout for laying out the text and then outputting the laid out text to the PDF.

This would probably require some more complicated internal code to make the PDF generation less painful (namely having our own justification code for vertical justification, based on the azul-text-layout-computed heights and widths). There were some bug reports in azul-text-layout last year indicating it seems to struggle with line breaking, but hopefully it works okay now...