pkourany / adafruit_mfgfx_ide Goto Github PK
View Code? Open in Web Editor NEWMultifont GFX library for IDE, adapted from Adafruit_GFX library
License: Other
Multifont GFX library for IDE, adapted from Adafruit_GFX library
License: Other
Hello, I'm trying to create a small, custom 3x5 font and am having issues getting it to display correctly. I'm using a 16x32 LED matrix and Particle photon.
I only need a small subset of the 0x20 - 0x7F character set. I made custom bitmaps in an spreadsheet below:
Below is my hard-coded bitmap and descriptor. Since I only need a few characters, I figured I can make the unused characters blank. (note: added comments in the bitmap for clarity, I remove them when compiling)
Can the bitmap have any start and end character or do I have define all the characters between 0x20 and 0x7F?
Thanks in advance and appreciate any insight you might have!
#ifdef TESTFONT
const uint8_t testBitmaps[] =
{
0x20, 0x5B, // Start Character, End Character
0x00, // ' '
0x00, // '!'
0x00, // '"'
0x00, // '#'
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x3E, 0x22, 0x3E,
0x3E,
0x2E, 0x2A, 0x3A,
0x2A, 0x2A, 0x3E,
0x38, 0x08, 0x3E,
0x3A, 0x2A, 0x2E,
0x3E, 0x2A, 0x2E,
0x20, 0x20, 0x3E,
0x3E, 0x2A, 0x3E,
0x38, 0x28, 0x3E,
0x14,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x3E, 0x22, 0x1C,
0x00,
0x00,
0x00,
0x3E, 0x08, 0x3E,
0x00,
0x00,
0x00,
0x00,
0x3E, 0x10, 0x3E,
0x00,
0x00,
0x00,
0x00,
0x00,
0x3A, 0x2A, 0x2E,
0x00,
0x00,
0x00,
0x00,
0x00,
0x38, 0x0E, 0x38, // 'Y'
0x00 // 'Z'
};
const FontDescriptor testDescriptors[] =
{
{1, 5, 0},
{1, 5, 1},
{1, 5, 2},
{1, 5, 3},
{1, 5, 4},
{1, 5, 5},
{1, 5, 6},
{1, 5, 7},
{1, 5, 8},
{1, 5, 9},
{1, 5, 10},
{1, 5, 11},
{1, 5, 12},
{1, 5, 13},
{1, 5, 14},
{1, 5, 15},
{3, 5, 16},
{1, 5, 19},
{3, 5, 20},
{3, 5, 23},
{3, 5, 26},
{3, 5, 29},
{3, 5, 32},
{3, 5, 35},
{3, 5, 38},
{3, 5, 41},
{1, 5, 42},
{1, 5, 43},
{1, 5, 44},
{1, 5, 45},
{1, 5, 46},
{1, 5, 47},
{1, 5, 48},
{1, 5, 49},
{1, 5, 50},
{1, 5, 51},
{3, 5, 52},
{1, 5, 55},
{1, 5, 56},
{1, 5, 57},
{3, 5, 58},
{1, 5, 61},
{1, 5, 62},
{1, 5, 63},
{1, 5, 64},
{3, 5, 65},
{1, 5, 68},
{1, 5, 69},
{1, 5, 70},
{1, 5, 71},
{1, 5, 72},
{3, 5, 73},
{1, 5, 76},
{1, 5, 77},
{1, 5, 78},
{1, 5, 79},
{1, 5, 80},
{3, 5, 81},
{1, 5, 82}
};
#endif //TESTFONT
What is "Particle.h" ?
I have not
Board is Zero SAMD21
In sweden we has å ä ö Å Ä Ö charracters and i see in the readme for this repository its says "The free TheDotFactory Windows program is recommended for creating font data compatible with the Adafruit_mfGFX library.".
So i downloaded it and maked a font like i whanted it but the Descriptors is a two dimension array like this:
`const FontDescriptor SWE_8ptDescriptors[] =
{
{1, 0}, // !
{3, 15}, // " `
and in the fonts.pp its looks like:
const FontDescriptor arial_8ptDescriptors[] =
{
{2, 10, 0},
{1, 10, 10},
any idea how to make my swedish font to work?
That macro makes the use of several std:: classes rather difficult.
This rather simple test throws a load of errors all in std::vector
#include "Adafruit_mfGFX/Adafruit_mfGFX.h"
#include <vector>
void setup() { }
void loop() { }
Sure #undef swap
does fix that, but still ;-)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.