Progress on Press has been a bit slower lately. I’ve fixed most of the errors I discovered by running the exported PDFs through the 3-Heights PDF validator. I also refactored the code and reorganized the package per Kenneth Reitz’s advice.
I’ve implemented initial support for embedding subsetted fonts (doing the subsetting via fontTools.subset
), and while the fonts (including uninstalled fonts) display fine on my macOS box, the PDFs don’t validate properly and the fonts don’t show at all on iOS, which means the embedding isn’t actually working right. Current suspects include the /Differences
array (which I’m not generating properly yet) and the CMap (which I haven’t implemented at all yet). I still have to implement ToUnicode
as well, so that copying and pasting does what it should, but I’m fairly certain that isn’t what’s causing the fonts to not embed properly.
I’m also trying to figure out color spaces. In general I believe I want the output to be either DeviceRGB
or DeviceCMYK
, with some way of specifying an output intent, and also an option for the user to embed an ICC profile if they want. I’m part of the way there.
Anyway, the font stuff is far more complicated than I expected going in, but I’m still making progress, and I’m learning a lot.