Skip to content

Commit 31e4578

Browse files
Version 2.0.1
1 parent 35a83d5 commit 31e4578

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

extra/doc/fonts/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ static const std::array<uint8_t, 12>FontBinaryExample[] =
6161

6262
*Sources*
6363

64+
Fonts can be made from **ttf** files using [this tool.](https://github.com/gavinlyonsrepo/Colossus_LTSM) also written by author.
65+
6466
1. Some of the fonts packaged with library came from [URL LINK](http://rinkydinkelectronics.com/)
6567
2. These fonts have horizontally addressed data by default.
6668
3. They must be converted to vertically addressed font data if user wants them for library.

src/displaylib/display_fonts.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*/
1313
static const std::array<uint8_t, 1534> FontDefault =
1414
{
15-
0x06, 0x08, 0x00, 0xFF, // x_size, y_size, offset, total characters,
15+
0x06, 0x08, 0x00, 0xFE, // x_size, y_size, offset, (last char - offset)
1616
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1717
0x00, 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, // :)
1818
0x00, 0x3E, 0x6B, 0x4F, 0x6B, 0x3E,
@@ -276,7 +276,7 @@ static const std::array<uint8_t, 1534> FontDefault =
276276
*/
277277
static const std::array<uint8_t, 535> FontWide =
278278
{
279-
0x09, 0x08, 0x20, 0x3A, // x_size, y_size, offset, total characters,
279+
0x09, 0x08, 0x20, 0x3A, // x_size, y_size, offset, (last char - offset)
280280
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //
281281
0x00,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x00, // !
282282
0x00,0x00,0x03,0x00,0x03,0x00,0x00,0x00,0x00, // "
@@ -345,7 +345,7 @@ static const std::array<uint8_t, 535> FontWide =
345345
*/
346346
static const std::array<uint8_t, 764> FontSinclairS=
347347
{
348-
0x08,0x08,0x20,0x5F,
348+
0x08,0x08,0x20,0x5E,
349349
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // <space>
350350
0x00,0x00,0x00,0x00,0x5F,0x00,0x00,0x00, // !
351351
0x00,0x00,0x00,0x03,0x00,0x03,0x00,0x00, // "
@@ -454,7 +454,7 @@ static const std::array<uint8_t, 764> FontSinclairS=
454454
*/
455455
static const std::array<uint8_t, 289> FontPICO =
456456
{
457-
0x04, 0x06, 0x20, 0x5f, // x-size, y-size, offset, total characters
457+
0x04, 0x06, 0x20, 0x5E, // x-size, y-size, offset, (last char - offset)
458458
0x00, 0x00, 0x00, 0x03, 0xa0, 0x00, 0xc0, 0x0c, 0x00, 0xf9, 0x4f, 0x80, 0x6b, 0xeb, 0x00, 0x98, 0x8c, 0x80, 0x52, 0xa5, 0x80, 0x03, 0x00, 0x00, // Space, !"#$%&'
459459
0x01, 0xc8, 0x80, 0x89, 0xc0, 0x00, 0x50, 0x85, 0x00, 0x21, 0xc2, 0x00, 0x08, 0x40, 0x00, 0x20, 0x82, 0x00, 0x00, 0x20, 0x00, 0x18, 0x8c, 0x00, // ()*+,-./
460460
0xfa, 0x2f, 0x80, 0x4b, 0xe0, 0x80, 0x5a, 0x66, 0x80, 0x8a, 0xa5, 0x00, 0xe0, 0x8f, 0x80, 0xea, 0xab, 0x00, 0x72, 0xa9, 0x00, 0x9a, 0x8c, 0x00, // 01234567
@@ -476,7 +476,7 @@ static const std::array<uint8_t, 289> FontPICO =
476476
*/
477477
static const std::array<uint8_t, 3044> FontMEGA =
478478
{ // Size is 16x16 (NB 0x10 = 16 decimal)
479-
0x10,0x10,0x20,0x5F, // x-size, y-size, offset, total characters
479+
0x10,0x10,0x20,0x5E, // x-size, y-size, offset, (last char - offset)
480480
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // <space>
481481
0x00,0x00,0x00,0x00,0xF8,0xFC,0xFC,0xFC,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x73,0x73,0x73,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // !
482482
0x00,0x00,0x00,0x00,0x1E,0x3E,0x3E,0x00,0x00,0x00,0x3E,0x3E,0x1E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // "
@@ -586,7 +586,7 @@ static const std::array<uint8_t, 3044> FontMEGA =
586586
*/
587587
static const std::array<uint8_t, 3044> FontArialBold =
588588
{
589-
0x10,0x10,0x20,0x5F, // x-size, y-size, offset, total characters
589+
0x10,0x10,0x20,0x5E, // x-size, y-size, offset, (last char - offset)
590590
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // <space>
591591
0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x37,0x37,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // !
592592
0x00,0x00,0x00,0x00,0x00,0x3C,0x3C,0x00,0x00,0x3C,0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // "
@@ -696,7 +696,7 @@ static const std::array<uint8_t, 3044> FontArialBold =
696696
*/
697697
static const std::array<uint8_t, 3044> FontHallfetica =
698698
{
699-
0x10,0x10,0x20,0x5F, // x-size, y-size, offset, total characters
699+
0x10,0x10,0x20,0x5E, // x-size, y-size, offset, (last char - offset)
700700
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // <space>
701701
0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x27,0x27,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // !
702702
0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x38,0x00,0x38,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // "
@@ -806,7 +806,7 @@ static const std::array<uint8_t, 3044> FontHallfetica =
806806
*/
807807
static const std::array<uint8_t, 4564> FontArialRound =
808808
{
809-
0x10,0x18,0x20,0x5F, // x-size, y-size, offset, total characters
809+
0x10,0x18,0x20,0x5E, // x-size, y-size, offset, (last char - offset)
810810
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // <space>
811811
0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0xFF,0xFF,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x9F,0x9F,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x07,0x07,0x03,0x00,0x00,0x00,0x00,0x00,0x00, // !
812812
0x00,0x00,0x00,0x00,0xF0,0xFC,0xCC,0x00,0x00,0xF0,0xFC,0xCC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // "
@@ -910,13 +910,13 @@ static const std::array<uint8_t, 4564> FontArialRound =
910910
};
911911

912912
/*!
913-
Font type: Full font (95 chars)
913+
Font type: Full font (91 chars)
914914
Font size: 16x32 pixels
915915
Grotesk, This is a clear reading, modern sans-serif font.
916916
*/
917917
static const std::array<uint8_t, 5828> FontGrotesk =
918918
{
919-
0x10,0x20,0x20,0x5B, // x-size, y-size, offset, total characters
919+
0x10,0x20,0x20,0x5A, // x-size, y-size, offset, (last char - offset)
920920
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // <space>
921921
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0xF8,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x0F,0x0F,0x00,0x00,0x00,0x00,0x00,0x00, // !
922922
0x00,0x00,0x00,0xC0,0xF0,0xFC,0x7C,0x00,0x00,0xC0,0xF0,0xFC,0x7C,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x0F,0x0F,0x00,0x00,0x00,0x0F,0x0F,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // "
@@ -1022,7 +1022,7 @@ static const std::array<uint8_t, 5828> FontGrotesk =
10221022
*/
10231023
static const std::array<uint8_t, 2692> FontSixteenSeg =
10241024
{
1025-
0x20,0x30,0x2D,0x0D, // x-size, y-size, offset, total characters
1025+
0x20,0x30,0x2D,0x0D, // x-size, y-size, offset, (last char - offset)
10261026
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x80,0x00,0x00,0x80,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x01,0x00,0x00,0x01,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // -
10271027
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x38,0x38,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // .
10281028
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xF0,0xFC,0x7E,0x1F,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x0F,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0xF0,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xF8,0x7E,0x3F,0x0F,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // /

src/displaylib/display_graphics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ displaylib_graphics::displaylib_graphics(int16_t w, int16_t h) : WIDTH(w), HEIGH
2727
/*!
2828
@brief Write 1 character on OLED.
2929
@param x character starting position on x-axis.
30-
@param y character starting position on x-axis.
30+
@param y character starting position on y-axis.
3131
@param value Character to be written.
3232
@return Will return
3333
-# Success

0 commit comments

Comments
 (0)