Quote:
Originally Posted by geekmaster
EDIT: I am a little curious though, why did you "create" your OWN bitmap font, when there are so many good public domain bitmap fonts that you can just copy/paste? And, for a table as large as a character map, why did you only store ONE BIT per byte? I am also curious just how you were able to create that many characters containing that many pixels, and type them all into a C program accurately in such a short amount of time... What tools did you use to create a font so quickly that is indeed completely your own with no credit to share with others? If you really wanted your font pixels packed just one bit per byte and you do not have problems with giving others credit for their work, couldn't you just write a quick little C program or script to unpack a public domain font and output your bit table to stick into your program?
|
I'm not sure about the licensing / rules around other fonts, so decided that the safest thing to do was to just make up my own and give it the same license as the rest of the program. I used GIMP to draw the font, which supports saving to a .h file, along with .jpg / .png, etc. From that .h file, I removed all code related to looking up colour values, leaving only the array of bytes that make up the image. With only the array of bytes remaining, I re-formatted the whitespace so that the characters line up when viewed in a text editor, and added a few #defines about character size.
As far as using only one bit per byte, I wasn't thinking of that at the time. Perhpas I'll get around to improving that eventually, but now that I have text showing, the next things I'd like to work on are a keyboard, which I've made a start on, and then implementing the terminal itself. Once I have the basics working, then I'll go through and tidy it up, adding extra features as I do.
I have a working font now, so will probably leave that alone until later. But once I've got the terminal working, I may eventually add support for opening a font file and UTF-8.