fadden / CiderPress2

Tool for working with Apple II and vintage Mac disk images and file archives.
https://ciderpress2.com/
Apache License 2.0
44 stars 7 forks source link

Add code for processing and converting Print Shop fonts #13

Closed markdavidlong closed 7 months ago

markdavidlong commented 7 months ago

This is a Converter subclass to process Print Shop fonts. It is based off of the PrintShopClip class. It does make-or-break validation on the 2 potential starting addresses, the maximum-allowed file length, and the integrity of the internal character pointers within the file. It also does secondary validation on the widths and heights of each character in the file to check for conformation to the boundaries available in the Print Shop Companion font editor (49x39). If the geometry isn't 100% conforming, the validator still passes with a ProbablyYes status. I have tested it on the fonts on a modified-for-readability Print Shop disk, the Print Shop Companion disk, and various 3rd-party font library disks. There is currently only DOS B-Type file support, and no support for ProDOS and Print Shop GS fonts, which I plan on implementing as I get more data to research and test with.

One quirk of the Print Shop fonts is that the character at offset #32 is used as a pointer to the clip art image the user selects in the program to use in the current project. While it is possible to include self-contained data for that character within the font file, it doesn't seem to be a common occurrence, and it would be ignored by the Print Shop application, so my code just skips that character altogether.

Also included are documentation updates in the PrintShop-notes.md file, sharing my research notes from my exploration of the font format and thoughts I had while implementing this class.

markdavidlong commented 7 months ago

There is one remaining issue. The DISCRIMINATOR string is very minimal. I wasn't exactly sure what specifically needed to be there. It may need to be edited.

fadden commented 7 months ago

LGTM