childs@cadnetix.COM (David Childs) (05/10/88)
I'm playing a bit with Amiga fonts. I understand how fonts are written out to files, but I need help converting them to a new format. Basically a font is a large bitmap that is #ofchars * charwidth wide by char height tall. The problem with this is that this bitmap can be larger than the blitter can handle. I want to transpose the bitmap to be like the following. from: 12345 to: 16AFK 67890 27BGL ABCDE 38CHM FGHIJ 49DIN KLMNO 50EJO From this you can get the idea. I am trying to download the font to a format than can be blasted to my printer. Is there any way to do this with the blitter. The best solution would be to transform the original bitmap to an 24 wide by charwidth high bitmap, and then just write out a row at a time. Really what I have is: ...xx12345xx... and I want: 16AFK ...xx67890xx... 27BGL ...xxABCDExx... 38CHM ...xxFGHIJxx... 49DIN ...xxKLMNOxx... 50EJO My current idea is to byte copy the correct data to an allocated bitmap. Another possibility is to do a Text() into a raster, and then use that bitmap. I then get a fix size bitmap with the data I want in it. For each column in the bitmap I must now do the following: BLIT of width = 1, height = charheight to a bitmap that is 1 wide by 24 high. Now comes the fun part. (I have to do the following because my printer is 24 pin, but it take the 24 bits of info as the least significant bits of 4 bytes insted of just 3 bytes. I want to handle up to 24 bit high fonts with no problem.) Refer to the (1,24) bitmap as a (6,4) bitmap. (still the same 24 bits) (Will this work or am I stuck with a bitmap of a multiple of 8 bits wide?) Then BLIT the (6,4) bitmap to offset (2,0) to a (8,4) bitmap thereby loading the 4 bytes to drive the printer head. I realize that I may be doing this the WRONG way. I know I could just copy 4 (1,6) bitmaps, but I was worried about the speed of the blitter vs. the setup time of the blitter. Any better ideas? Does the blitter have a command to do this for me? Thanks, David David Childs Internet: childs@cadnetix.COM Cadnetix Corp UUCP: cadnetix!childs 5775 Flatiron Pkwy {uunet,boulder,nbires}!cadnetix!childs Boulder, CO 80301