Shop OBEX P1 Docs P2 Docs Learn Events
user defined fonts — Parallax Forums

user defined fonts

StefanL38StefanL38 Posts: 2,292
edited 2007-06-22 12:10 in Propeller 1
Hello,

i would like to use the propeller for driving a TV or VGA-display which shows a chinese font

where can i find information about userdefined fonts for the propeller?

i know there a lot of chinese letters even in simplified chinese

32kB RAM is much too less

so my idea is to store something like a black/white Bitmap-font 10x10 to maybe 24x24 Pixels (24x24/8=72 bytes) on a SD-Card.

if the SD-Card reading is done in assembler would it be possibe
to write smallsize black/white "bitmaps" into the RAM representig the pixels on the screen?

how fast (just estimating microseconds, millisconds, or seconds) would it be to read 72 byte from the SD-card?
in Assembler ? in SPIN?

parameter to a PUB "write_bitmap_character" is the unicode number of the chinese letter
(similar to ASCII-Code)

the code is calculating the offsetvalue where the bitmap for this chinese letter is stored on the SD-card
(out of the unicode number)

then reading just the 72 bytes from the SD-card and storing the pixelpattern to Screen-RAM

has somebody code-snippets showing drawing pixels? or even writing a userdefined font this way?


thank you already now for any suggestions or links

best regards

Stefan

Comments

  • BaggersBaggers Posts: 3,019
    edited 2007-06-22 12:10
    Hi StefanL38,
    Just to answer your question about reading 72 bytes from SD-card, it would depend on where about it is on the SD and if it's lots of seperate files on the SD etc. there are lots of contributing factors to this.
    Baring in mind there is also no SEEK function at the moment for the FSRW fat drivers, so you wouldn't be able to have just one file, unless you modify the ( or remake your own ) fat drivers.
    either way, you get roughly 5K per 60Hz or 6K per 50Hz IF the file is sequential and not fragmented, and already opened.

    As for drawing user-defined characters there are many many ways of skinning this cat, as they say, it depends on which tv drivers you use, ( or make your own ) I suggest you first start off with GraphicsDemo.spin and look at how that is getting graphics onto the screen to start with, you could also either draw the characters as lines, they don't have to be bitmaps, that way they would scale quite nicely [noparse]:)[/noparse] if you wanted them to scale for any reason. So it really depends on what look your app wants exactly.

    good luck.

    regards,
    Baggers.
Sign In or Register to comment.