serch ah way to get font pixeldata #395
Unanswered
Grassbaecker
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Serch for ah way to get font into ah pixelbuffer
like somthing in the following code
but the fonts i become are to less for my german letter needs like Ö för Östereich.
hope somebody can help me
#include "nano_gfx.h"
void GetNano6X8Bitmap(char c,bool dest[8][6]) {
char ch[1];
ch[0] = c;
uint8_t nbuffer[8];
bool bitbuf[8][8];
//Build ah Virtual Display
NanoCanvas can(8,8, nbuffer);
//Get Char into Virtual Display
can.char_f6x8(0, 0,ch, STYLE_NORMAL);
//Copy Char into 8X8 bool array
for(int y=0;y<8;y++) {
for(int x=0;x<8;x++) {
if(bitRead(nbuffer[y],x)) {
bitbuf[y][x] = true;
} else {
bitbuf[y][x] = false;
}
}
}
//Copy and turn Char into destination Buffer
for(int x=0;x<8;x++) {
for(int y=0;y<6;y++) {
dest[x][y] = bitbuf[y][x];
}
}
}
Beta Was this translation helpful? Give feedback.
All reactions