Using Custom Fonts
Posted: Mon Aug 31, 2020 7:03 pm
Hello Support,
I'm trying to figure out the proper procedure to use a custom font using the Matrix Orbital EVE3 development set and Rudolf Riedel's excellent code library. Here's the procedure I've followed:
1. Using EVE Asset Builder v1.4:
- Input desired font library and selected output folder
- Font Size of 30, no Manual Kerning
- Legacy Format, BT81X, SETFONT, RAM_G + 1000
- Printable ASCII Characters
2. Font is converted, and data from ...L1.rawh is copied into my program as an array:
const uint8_t appfont[13300] PROGMEM =
{
/*The expected raw bitmap size is 13300 Bytes */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, ... 0,0,0};
3. At this point, I think I need to inflate the data into GRAM?
#define MEM_FONT 0x00000000
EVE_cmd_inflate(MEM_FONT, appfont, sizeof(appfont));
It's at this point after compiling and downloading the code the application crashes. I haven't made it past this point.
4. Use the font:
EVE_cmd_dl(DL_COLOR_RGB | BLUE);
EVE_cmd_dl(DL_BEGIN | EVE_BITMAPS);
EVE_cmd_setbitmap(MEM_FONT, EVE_L1, 32, 35);
EVE_cmd_setfont(1000, MEM_FONT);
EVE_cmd_text(100, 300, 1000, 0, "TEST FONT");
EVE_cmd_dl(DL_END);
I've seen a handful of examples but most of them use a file from a file and I need to load them from my micro's flash using Rudolph's library. Any pointers would be helpful.
Thanks!
Alex
I'm trying to figure out the proper procedure to use a custom font using the Matrix Orbital EVE3 development set and Rudolf Riedel's excellent code library. Here's the procedure I've followed:
1. Using EVE Asset Builder v1.4:
- Input desired font library and selected output folder
- Font Size of 30, no Manual Kerning
- Legacy Format, BT81X, SETFONT, RAM_G + 1000
- Printable ASCII Characters
2. Font is converted, and data from ...L1.rawh is copied into my program as an array:
const uint8_t appfont[13300] PROGMEM =
{
/*The expected raw bitmap size is 13300 Bytes */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, ... 0,0,0};
3. At this point, I think I need to inflate the data into GRAM?
#define MEM_FONT 0x00000000
EVE_cmd_inflate(MEM_FONT, appfont, sizeof(appfont));
It's at this point after compiling and downloading the code the application crashes. I haven't made it past this point.
4. Use the font:
EVE_cmd_dl(DL_COLOR_RGB | BLUE);
EVE_cmd_dl(DL_BEGIN | EVE_BITMAPS);
EVE_cmd_setbitmap(MEM_FONT, EVE_L1, 32, 35);
EVE_cmd_setfont(1000, MEM_FONT);
EVE_cmd_text(100, 300, 1000, 0, "TEST FONT");
EVE_cmd_dl(DL_END);
I've seen a handful of examples but most of them use a file from a file and I need to load them from my micro's flash using Rudolph's library. Any pointers would be helpful.
Thanks!
Alex