|
Post by Pinguin66 on Jun 26, 2017 14:23:46 GMT -8
Hi there,
FT810/811 is running fine with 5" 800x480 display. But the custom fonts are not working.
I used the gd2asset.exe from Jamesn not the python version, font conversion completes with no errors. But when I load the custom font assets and print some texts on display I only get white filled reacangles.
Whats the problem??
INO.code
#include <SPI.h> #include <GD3.h> #include "fontdemo_assets.h"
void setup() { GD.begin(0); LOAD_ASSETS(); }
void loop() { GD.ClearColorRGB(0x103000); GD.Clear(); GD.cmd_text(240, 136, COMICSANS_HANDLE, OPT_CENTER, "Hello world in Comic Sans MS"); GD.cmd_button(160, 200, 160, 40, 0, 0, "Press me!"); GD.swap(); } fontdemo_assets.h code (deleted the font assets array for better reading)
static const PROGMEM uint8_t __assets[8829] = { 0, 0, 0, 5, ...
.... 236, 0, 217 }; #define LOAD_ASSETS() GD.copy(__assets, sizeof(__assets)) #define COMICSANS_HANDLE 0 #define COMICSANS_WIDTH 29 #define COMICSANS_HEIGHT 42 #define COMICSANS_CELLS 96 #define ASSETS_END 60628UL static const shape_t COMICSANS_SHAPE = {0, 29, 42, 0};
|
|
|
Post by Pinguin66 on Jun 29, 2017 0:20:29 GMT -8
The problem is SOLVED!
I use EVE screen editor for convertig fonts now.
|
|