Replies: 1 comment 3 replies
-
Depends on what you mean by "packed". But yes, some values are bit encoded in the byte stream. I mean, if certain values do not require a full byte, then only some bits are used.
lookup of glyphs is faster and also the drawing itself is faster, because the low level drawing function in u8g2 allows drawing repeated pixel of the same color. So the RLE compression also optimizes data transfer via the low level procedures.
puh, this is just a spare time project... If you have a specific question I can try to answer this. |
Beta Was this translation helpful? Give feedback.
-
When writing a string, u8g2 looks up the individual char data in the font array and somehow converts the data in there to a bitmap right? I am trying to understand how so I can use the same data to draw the pixels as a preview on a webpage. I gleamed some insight from reading https://github.com/olikraus/u8g2/wiki/u8g2fontformat. Like the data in the font arrays is compressed in a few ways to save memory. But I still feel pretty ignorant. Please correct me if I am wrong:
FONT ARRAY of exclamation mark:
Would be nice if someone perhaps could explain from the above font array (from a single exclamation mark char "!"), how I should mentally parse this data. And also what objections there are against using bitmap arrays for custom font characters.
BITMAP ARRAY of exclamation mark:
Apart from the fact that u8g2 provides a string print function that does the character lookup and placement/spacing for me and the memory storage benefits due to the compression smartness. Does the string drawing have other benefits over using bitmap arrays for my custom font characters and using my own print function?
Beta Was this translation helpful? Give feedback.
All reactions