Printing letters with a set_pixel function (c)


I have a set_pixel function (a function that sets the color of a pixel in a example display), and I only have this method of output to print to a display.

I was trying to print some characters to the screen for debugging and other general purposes, but the only way I found to accomplish this is by printing each letter pixel by pixel, a very slow and tedious thing, considering that I will use uppercases and numbers.

For this I’m using C as my language in a freestanding environment, without the standard libraries, like <stdio.h> or any kind of library, but I could re-implement something I guess or port some libraries.

How I can accomplish this without going pixel by pixel? Thanks in advance!


Ultimately, under the stated conditions, you will have to set each pixel. You would need to develop some routines that can draw lines or fill areas, and you can then define letters in terms of lines or areas to be filled.
What exactly do you mean by “going pixel by pixel”? Please show some of your code that does it.