Aleo, Noto Sans, Open Dyslexic fonts (#163)
## Summary * Swap out Bookerly font due to licensing issues, replace default font with Aleo * I did a bunch of searching around for a nice replacement font, and this trumped several other like Literata, Merriwether, Vollkorn, etc * Add Noto Sans, and Open Dyslexic as font options * They can be selected in the settings screen * Add font size options (Small, Medium, Large, Extra Large) * Adjustable in settings * Swap out uses of reader font in headings and replaced with slightly larger Ubuntu font * Replaced PixelArial14 font as it was difficult to track down, replace with Space Grotesk * Remove auto formatting on generated font files * Massively speeds up formatting step now that there is a lot more CPP font source * Include fonts with their licenses in the repo ## Additional Context Line compression setting will follow | Font | Small | Medium | Large | X Large | | --- | --- | --- | --- | --- | | Aleo |  |  |  |  | | Noto Sans |  |  |  |  | | Open Dyslexic |  |  |  |  |
This commit is contained in:
@@ -38,6 +38,11 @@ class CrossPointSettings {
|
||||
// Swapped: Next, Previous
|
||||
enum SIDE_BUTTON_LAYOUT { PREV_NEXT = 0, NEXT_PREV = 1 };
|
||||
|
||||
// Font family options
|
||||
enum FONT_FAMILY { ALEO = 0, NOTOSANS = 1, OPENDYSLEXIC = 2 };
|
||||
// Font size options
|
||||
enum FONT_SIZE { SMALL = 0, MEDIUM = 1, LARGE = 2, EXTRA_LARGE = 3 };
|
||||
|
||||
// Sleep screen settings
|
||||
uint8_t sleepScreen = DARK;
|
||||
// Status bar settings
|
||||
@@ -53,6 +58,10 @@ class CrossPointSettings {
|
||||
uint8_t frontButtonLayout = BACK_CONFIRM_LEFT_RIGHT;
|
||||
// Side button layout
|
||||
uint8_t sideButtonLayout = PREV_NEXT;
|
||||
// Font family
|
||||
uint8_t fontFamily = ALEO;
|
||||
// Font size
|
||||
uint8_t fontSize = MEDIUM;
|
||||
|
||||
~CrossPointSettings() = default;
|
||||
|
||||
@@ -60,6 +69,7 @@ class CrossPointSettings {
|
||||
static CrossPointSettings& getInstance() { return instance; }
|
||||
|
||||
uint16_t getPowerButtonDuration() const { return shortPwrBtn ? 10 : 400; }
|
||||
int getReaderFontId() const;
|
||||
|
||||
bool saveToFile() const;
|
||||
bool loadFromFile();
|
||||
|
||||
Reference in New Issue
Block a user