Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

Need a fast way to insert ascii charts to Code

Hi,

I'm using Terasic LCD TOUCH MODEL and I allready interfaced with the screen.

I made a "putPixel(X,Y,Color)" function which enters a dot to the cordinate I choose on the screen.

now I want to insert Characters, but I dont want to write how every char looks like.

is there a way to take a function that presents a character and change the output from the PC screen to my Touch Screen?

10x!!!

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Last time I needed to do that I processed a screen dump to steal the font :-)

    Otherwise you'll need to decide on which pixels are needed for each byte/char value yourself!
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Search the web for "font bitmap" or something along those lines, I'm sure there are some available. For the NEEK we used a script that would take a font collection and output .h files that contained arrays for each character. So if you wanted to use those ones go ahead. I don't know where the script went so you would be stuck with the ones we generated unfortunately. Designs like the C2H Mandlebrot design draws text to the screen so you can take a look at that font file, it's probably in the ballpark of 26pt but on that tiny screen the text is pretty small.