U8glib - easy way to access font bitmap data as byte array?

Hi,

I've been working with U8glib for a while and its a great library. My current project has an LCD and I'm using two different size fonts and all is going swimmingly. Now I find myself wanting to light some LEDs to create text and ideally instead of putting another font in memory I would be able to access the bitmap data for the two fonts im currently using on the LCD display.

Essentially I want to be able to access the byte arrays for any given letter in the font the same way I would access the data for a custom bitmap that might be in memory. Usually U8glib just handles this on the way to writing to the screen so I guess I'm trying to intercept the data. Before I dig into the guts of the library I'm just wondering if there is a simple solution that I'm missing.

Thanks,
D

Hi

The font binary data is a little bit compressed. Some documentation is given in u8g_font.c.

How do you access the LEDs? U8glib includes a HT1632 device, this means the same code can drive display and a HT1632 based LED matrix.

Oliver

I would be passing the font bitmap data to a strip of addressable LEDs as a sort of POV wand. In essence it's like a 50px tall but only 1px wide LCD. Then I would basically scroll through the text bitmap data to refresh the LED strip with each column of pixels over a given time.

The code to send everything to the LEDs and the timing is home rolled code but I wonder if there would be a way to simulate a 1px wide LCD and just redirect the U8glib that way but then have the actual bitmap output write to an array that I could just push to my LED strip.

Speed might be another issue. In an airport now so I'll have to wait til I get back home to hack around more.

ok, i see.
I think it would be best to have a adjustable memory bitmap, which allows rendering the picture into RAM. However, such a feature does not yet exist in u8glib. I will create an issue for this.

Oliver

Thanks Oliver, I think allowing one to render the picture into RAM would be a great feature and would do exactly what I would need.

I'll keep an eye on the library to see if the change gets added in.

Cheers!