Code Monkey home page Code Monkey logo

adafruit_mfgfx_ide's People

Contributors

pkourany avatar tmm1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

adafruit_mfgfx_ide's Issues

Questions re: custom fonts

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:
image

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

How to make a swedish font?

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?

Please replace #define swap()

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 ;-)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.