Merge pull request #158 from thooge/fonts

8bit font for Ubuntu Bold
This commit is contained in:
Norbert Walter 2025-03-04 21:09:42 +01:00 committed by GitHub
commit 7c9b615526
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 1273 additions and 21 deletions

View File

@ -24,6 +24,8 @@
#include "DSEG7Classic-BoldItalic60pt7b.h" #include "DSEG7Classic-BoldItalic60pt7b.h"
#include "Atari16px8b.h" // Key label font #include "Atari16px8b.h" // Key label font
#include "Ubuntu_Bold20pt8b.h"
// E-Ink Display // E-Ink Display
#define GxEPD_WIDTH 400 // Display width #define GxEPD_WIDTH 400 // Display width
#define GxEPD_HEIGHT 300 // Display height #define GxEPD_HEIGHT 300 // Display height

View File

@ -31,6 +31,7 @@ extern const GFXfont Ubuntu_Bold10pt7b;
extern const GFXfont Ubuntu_Bold12pt7b; extern const GFXfont Ubuntu_Bold12pt7b;
extern const GFXfont Ubuntu_Bold16pt7b; extern const GFXfont Ubuntu_Bold16pt7b;
extern const GFXfont Ubuntu_Bold20pt7b; extern const GFXfont Ubuntu_Bold20pt7b;
extern const GFXfont Ubuntu_Bold20pt8b;
extern const GFXfont Ubuntu_Bold32pt7b; extern const GFXfont Ubuntu_Bold32pt7b;
extern const GFXfont DSEG7Classic_BoldItalic16pt7b; extern const GFXfont DSEG7Classic_BoldItalic16pt7b;
extern const GFXfont DSEG7Classic_BoldItalic20pt7b; extern const GFXfont DSEG7Classic_BoldItalic20pt7b;

View File

@ -346,7 +346,7 @@ FormatedData formatValue(GwApi::BoatValue *value, CommonData &commondata){
else{ else{
latdir = "S"; latdir = "S";
} }
latitude = String(degree,0) + "\" " + String(minute,4) + "' " + latdir; latitude = String(degree,0) + "\x90 " + String(minute,4) + "' " + latdir;
result.unit = ""; result.unit = "";
strcpy(buffer, latitude.c_str()); strcpy(buffer, latitude.c_str());
} }
@ -370,7 +370,7 @@ FormatedData formatValue(GwApi::BoatValue *value, CommonData &commondata){
else{ else{
londir = "W"; londir = "W";
} }
longitude = String(degree,0) + "\" " + String(minute,4) + "' " + londir; longitude = String(degree,0) + "\x90 " + String(minute,4) + "' " + londir;
result.unit = ""; result.unit = "";
strcpy(buffer, longitude.c_str()); strcpy(buffer, longitude.c_str());
} }

View File

@ -98,7 +98,7 @@ class PageFourValues2 : public Page
// ############### Value 1 ################ // ############### Value 1 ################
// Show name // Show name
getdisplay().setFont(&Ubuntu_Bold20pt7b); getdisplay().setFont(&Ubuntu_Bold20pt8b);
getdisplay().setCursor(20, 55); getdisplay().setCursor(20, 55);
getdisplay().print(name1); // Page name getdisplay().print(name1); // Page name
@ -146,7 +146,7 @@ class PageFourValues2 : public Page
// ############### Value 2 ################ // ############### Value 2 ################
// Show name // Show name
getdisplay().setFont(&Ubuntu_Bold20pt7b); getdisplay().setFont(&Ubuntu_Bold20pt8b);
getdisplay().setCursor(20, 145); getdisplay().setCursor(20, 145);
getdisplay().print(name2); // Page name getdisplay().print(name2); // Page name

View File

@ -67,7 +67,7 @@ class PageOneValue : public Page
getdisplay().print(name1); // Page name getdisplay().print(name1); // Page name
// Show unit // Show unit
getdisplay().setFont(&Ubuntu_Bold20pt7b); getdisplay().setFont(&Ubuntu_Bold20pt8b);
getdisplay().setCursor(270, 100); getdisplay().setCursor(270, 100);
if(holdvalues == false){ if(holdvalues == false){
getdisplay().print(unit1); // Unit getdisplay().print(unit1); // Unit
@ -78,7 +78,7 @@ class PageOneValue : public Page
// Switch font if format for any values // Switch font if format for any values
if(bvalue1->getFormat() == "formatLatitude" || bvalue1->getFormat() == "formatLongitude"){ if(bvalue1->getFormat() == "formatLatitude" || bvalue1->getFormat() == "formatLongitude"){
getdisplay().setFont(&Ubuntu_Bold20pt7b); getdisplay().setFont(&Ubuntu_Bold20pt8b);
getdisplay().setCursor(20, 180); getdisplay().setCursor(20, 180);
} }
else if(bvalue1->getFormat() == "formatTime" || bvalue1->getFormat() == "formatDate"){ else if(bvalue1->getFormat() == "formatTime" || bvalue1->getFormat() == "formatDate"){

View File

@ -86,7 +86,7 @@ class PageThreeValues : public Page
// Show name // Show name
getdisplay().setTextColor(commonData->fgcolor); getdisplay().setTextColor(commonData->fgcolor);
getdisplay().setFont(&Ubuntu_Bold20pt7b); getdisplay().setFont(&Ubuntu_Bold20pt8b);
getdisplay().setCursor(20, 55); getdisplay().setCursor(20, 55);
getdisplay().print(name1); // Page name getdisplay().print(name1); // Page name
@ -102,11 +102,11 @@ class PageThreeValues : public Page
// Switch font if format for any values // Switch font if format for any values
if(bvalue1->getFormat() == "formatLatitude" || bvalue1->getFormat() == "formatLongitude"){ if(bvalue1->getFormat() == "formatLatitude" || bvalue1->getFormat() == "formatLongitude"){
getdisplay().setFont(&Ubuntu_Bold20pt7b); getdisplay().setFont(&Ubuntu_Bold20pt8b);
getdisplay().setCursor(50, 90); getdisplay().setCursor(50, 90);
} }
else if(bvalue1->getFormat() == "formatTime" || bvalue1->getFormat() == "formatDate"){ else if(bvalue1->getFormat() == "formatTime" || bvalue1->getFormat() == "formatDate"){
getdisplay().setFont(&Ubuntu_Bold20pt7b); getdisplay().setFont(&Ubuntu_Bold20pt8b);
getdisplay().setCursor(170, 68); getdisplay().setCursor(170, 68);
} }
else{ else{
@ -134,7 +134,7 @@ class PageThreeValues : public Page
// ############### Value 2 ################ // ############### Value 2 ################
// Show name // Show name
getdisplay().setFont(&Ubuntu_Bold20pt7b); getdisplay().setFont(&Ubuntu_Bold20pt8b);
getdisplay().setCursor(20, 145); getdisplay().setCursor(20, 145);
getdisplay().print(name2); // Page name getdisplay().print(name2); // Page name
@ -150,11 +150,11 @@ class PageThreeValues : public Page
// Switch font if format for any values // Switch font if format for any values
if(bvalue2->getFormat() == "formatLatitude" || bvalue2->getFormat() == "formatLongitude"){ if(bvalue2->getFormat() == "formatLatitude" || bvalue2->getFormat() == "formatLongitude"){
getdisplay().setFont(&Ubuntu_Bold20pt7b); getdisplay().setFont(&Ubuntu_Bold20pt8b);
getdisplay().setCursor(50, 180); getdisplay().setCursor(50, 180);
} }
else if(bvalue2->getFormat() == "formatTime" || bvalue2->getFormat() == "formatDate"){ else if(bvalue2->getFormat() == "formatTime" || bvalue2->getFormat() == "formatDate"){
getdisplay().setFont(&Ubuntu_Bold20pt7b); getdisplay().setFont(&Ubuntu_Bold20pt8b);
getdisplay().setCursor(170, 158); getdisplay().setCursor(170, 158);
} }
else{ else{
@ -182,7 +182,7 @@ class PageThreeValues : public Page
// ############### Value 3 ################ // ############### Value 3 ################
// Show name // Show name
getdisplay().setFont(&Ubuntu_Bold20pt7b); getdisplay().setFont(&Ubuntu_Bold20pt8b);
getdisplay().setCursor(20, 235); getdisplay().setCursor(20, 235);
getdisplay().print(name3); // Page name getdisplay().print(name3); // Page name
@ -198,11 +198,11 @@ class PageThreeValues : public Page
// Switch font if format for any values // Switch font if format for any values
if(bvalue3->getFormat() == "formatLatitude" || bvalue3->getFormat() == "formatLongitude"){ if(bvalue3->getFormat() == "formatLatitude" || bvalue3->getFormat() == "formatLongitude"){
getdisplay().setFont(&Ubuntu_Bold20pt7b); getdisplay().setFont(&Ubuntu_Bold20pt8b);
getdisplay().setCursor(50, 270); getdisplay().setCursor(50, 270);
} }
else if(bvalue3->getFormat() == "formatTime" || bvalue3->getFormat() == "formatDate"){ else if(bvalue3->getFormat() == "formatTime" || bvalue3->getFormat() == "formatDate"){
getdisplay().setFont(&Ubuntu_Bold20pt7b); getdisplay().setFont(&Ubuntu_Bold20pt8b);
getdisplay().setCursor(170, 248); getdisplay().setCursor(170, 248);
} }
else{ else{

View File

@ -75,7 +75,7 @@ class PageTwoValues : public Page
// Show name // Show name
getdisplay().setTextColor(commonData->fgcolor); getdisplay().setTextColor(commonData->fgcolor);
getdisplay().setFont(&Ubuntu_Bold20pt7b); getdisplay().setFont(&Ubuntu_Bold20pt8b);
getdisplay().setCursor(20, 80); getdisplay().setCursor(20, 80);
getdisplay().print(name1); // Page name getdisplay().print(name1); // Page name
@ -91,11 +91,11 @@ class PageTwoValues : public Page
// Switch font if format for any values // Switch font if format for any values
if(bvalue1->getFormat() == "formatLatitude" || bvalue1->getFormat() == "formatLongitude"){ if(bvalue1->getFormat() == "formatLatitude" || bvalue1->getFormat() == "formatLongitude"){
getdisplay().setFont(&Ubuntu_Bold20pt7b); getdisplay().setFont(&Ubuntu_Bold20pt8b);
getdisplay().setCursor(50, 130); getdisplay().setCursor(50, 130);
} }
else if(bvalue1->getFormat() == "formatTime" || bvalue1->getFormat() == "formatDate"){ else if(bvalue1->getFormat() == "formatTime" || bvalue1->getFormat() == "formatDate"){
getdisplay().setFont(&Ubuntu_Bold20pt7b); getdisplay().setFont(&Ubuntu_Bold20pt8b);
getdisplay().setCursor(170, 105); getdisplay().setCursor(170, 105);
} }
else{ else{
@ -123,7 +123,7 @@ class PageTwoValues : public Page
// ############### Value 2 ################ // ############### Value 2 ################
// Show name // Show name
getdisplay().setFont(&Ubuntu_Bold20pt7b); getdisplay().setFont(&Ubuntu_Bold20pt8b);
getdisplay().setCursor(20, 190); getdisplay().setCursor(20, 190);
getdisplay().print(name2); // Page name getdisplay().print(name2); // Page name
@ -139,11 +139,11 @@ class PageTwoValues : public Page
// Switch font if format for any values // Switch font if format for any values
if(bvalue2->getFormat() == "formatLatitude" || bvalue2->getFormat() == "formatLongitude"){ if(bvalue2->getFormat() == "formatLatitude" || bvalue2->getFormat() == "formatLongitude"){
getdisplay().setFont(&Ubuntu_Bold20pt7b); getdisplay().setFont(&Ubuntu_Bold20pt8b);
getdisplay().setCursor(50, 240); getdisplay().setCursor(50, 240);
} }
else if(bvalue2->getFormat() == "formatTime" || bvalue2->getFormat() == "formatDate"){ else if(bvalue2->getFormat() == "formatTime" || bvalue2->getFormat() == "formatDate"){
getdisplay().setFont(&Ubuntu_Bold20pt7b); getdisplay().setFont(&Ubuntu_Bold20pt8b);
getdisplay().setCursor(170, 215); getdisplay().setCursor(170, 215);
} }
else{ else{

File diff suppressed because it is too large Load Diff