A page that carries no font
Four faces every reader already draws, set on one page, so the file holds no font at all — and the example weighs the same lines both ways to say what that saves.
This page is the whole program, for whoever writes your software. There is nothing here to read otherwise. Go back to the document it writes.
write_no_font_at_all.json
82 lines
This one is not a program. It is the request the document server is sent: the same page, asked for over the network by an application that writes no PDF code at all.
This request writes out the two weights the library counts for itself: 5 507 bytes for the page set in faces the file does not carry, and 39 684 for the same page with one face carried inside it. The library reads them off two throwaway documents it writes for the purpose, so they follow whatever goes into a document and whatever the carried face weighs; here they are typed in, and would have to be typed in again. The library also sets a grey before the closing note and then states black inside the note itself, so the grey paints nothing; the request states no colour there and draws the same page with one instruction fewer.