fadden / CiderPress2

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

Code for processing and converting Fontrix fonts #14

Closed markdavidlong closed 2 months ago

markdavidlong commented 9 months ago

Continuing with the theme of Font Converters...

This is a Converter subclass to process Fontrix fonts. It has options for showing the data in a linear fashion or in a grid and for removing inter-character spacing (useful for some fonts that are designed to scrunch up together.) I have also added a Fontrix-notes.md file and added a sample font (SET.BENGOT) to the dos-files.do.gz file. I've given the code and documentation a good once-over, so I hope formatting and such will be pretty solid. I've tested the code with about 40 fonts or so and it seems to be pretty robust.

markdavidlong commented 9 months ago

Shoot. I forgot to squash my changes before I pushed. Pardon my piecemeal commits.

markdavidlong commented 9 months ago

Thanks for the input. I'm going to have to go back to the drawing board on a few things, as I think I made some invalid assumptions about some of the internal formatting and there are a few sneaky bugs that are popping up. As such, I think this needs to stew a little bit more. I'll go ahead and integrate some of the low-hanging suggestions you made.

markdavidlong commented 9 months ago

The file SET.LEAVES didn't convert, because the ID bytes are wrong.

The font editor in fontrix bit-flips the ID bytes while it is editing the font. Ideally it should set them back to their proper values, but it looks reasonable that some fonts could have made it back into the wild without the reset. It would appear that in SET.LEAVES they are still XOR'd with 0xff. I think the easy solution is to validate either on the proper values or the complemented values.

fadden commented 5 months ago

I added Apple IIgs bitmap font conversion in https://github.com/fadden/CiderPress2/releases/tag/v1.0.2-dev1

The converter lets you pick between a grid and a sample string with a radio button:

image

image

Might be worth doing something like that for Fontrix.