BACK TO BLOG LIST

SUBSCRIBE: RSS ATOM

Updates on Print-Shanty

by NJB // // Silverthorne, CO

© 2024 Nicholas Bernhard

CC-BY-SA 4.0

In my last post about print-shanty, I didn’t provide a visual comparison of the two fonts.

As a recap, I am designing a script that helps turn a Shanty-formatted text file into a physical book. The input is Shanty, the output is a collection of SVG pages that can be printed to PDF.

I’ve been using Liberation Serif as the font for the physical books. Liberation Serif is the default font for Mozilla-based browsers I use, including Firefox on Debian, and “abrowser” on Trisquel. My script produces pages of a book as SVG files, which I then print to PDF using my browser.

By mistake, I viewed a book while using Bitstream Charter as my browser’s default font, rather than Liberation Serif. I already use Charter as the serif font for my e-books, and I thought it looked very nice for physical books. For one thing, the kerning is better, especially with apostrophes.

Here is a comparison, using the introduction of my upcoming book Letters From Santa, Volume I:

Output from my physical-book script, using Bitstream Charter as the font.

Above: Bitstream Charter

Output from my physical-book script, using Liberation Serif as the font.

Above: Liberation Serif

From what I can see, it’s a clear improvement.

Other Updates

I made some other improvements to the print-shanty script this morning.

I wanted a way to keep all the assets for different books, and all the output files, in separate folders, and the print-shanty file could sit one level above all these folders. That way, I wouldn’t have to keep moving files around every time I change projects.

There are two text files for each book: the Shanty file, and a “Publisher Object”, which includes metadata like the publisher logo, ISBN, LCCN, and copyright and licensing info.

Prior versions of print-shanty took the shanty file as an argument. There was also only one Publisher Object, which I would rewrite it for each project. Now, each project has one Shanty file and its own Publisher Object (a JSON file), and the script takes the folder name as the argument. It now looks like node print_shanty.js letters_from_santa_vol-i/ The script uses fs.readdir to look for the one Shanty file and the one JSON file in the folder, and loads them up.

These changes improve the workflow. I can move between projects much more easily now.

SHOW/HIDE COMMENTS
  • No comments yet.
  • WANT TO COMMENT?

    SEND AN E-MAIL TO NJB@NANTUCKETEBOOKS.COM WITH THIS SUBJECT LINE: