medley icon indicating copy to clipboard operation
medley copied to clipboard

HPRINT, EQUALALL, COPYALL, COMPARELISTS on Fonts

Open masinter opened this issue 4 years ago • 4 comments

this is partly a bug report and partly a feature request.

If I have two font files and want to compare them, there is no good way to do so. HPRINT fails to print out the character widths and offsets because they are raw pointers to the arrayp base of the array, and it doesn't know whether to treat the 256 byte block as an array of 8, 16, or 32 bit numbers. not sure, but it's worth checking for INSPECT, EQUALALL and COPYALL to see.

It would be nice if INSPECT on fonts did something more reasonable. (I say 'font' but really only checked for displayfont)

masinter avatar Sep 15 '21 16:09 masinter

This is an old bug. HPRINT is advertised as a "print anything" . It's been pretty effective and is integrated with the RECORD package. I think the 'record package' is interesting and worth writing up. So the problem is that fonts use a feature that was added without adding the feature in HPRINT. of creating a "hunk" without using the array headers.

It was probably done as an optimization.

masinter avatar Oct 26 '21 03:10 masinter

I made some progress on a "UNPACKFONT" feature -- the general idea is that we have a comparison on lists, so convert a font to a list structure that only uses lists, numbers, litatoms. FONTCOMPARE.txt

should dump in base64? Compare bitmaps better than READFILE of HPRINT. But at least it's a start.

masinter avatar Nov 27 '21 06:11 masinter

hprint fails (error message) when trying to print a (common lisp) character cannot print this item |#|

image

masinter avatar Sep 21 '22 22:09 masinter