mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-01 10:21:59 +00:00
feat(eink): 4.2" 400x300 build with the misc-fixed 9x15 font, wide sim
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -14,7 +14,8 @@ class Adafruit_GFX;
|
||||
// (GxEPDDisplay.cpp on a board, the sim's target.cpp): it pulls in the font
|
||||
// tables.
|
||||
|
||||
// EINK_LARGE_FONT: a landscape panel writes in the 8x13 at its own resolution.
|
||||
// EINK_LARGE_FONT: a landscape panel writes in the 8x13 at its own resolution
|
||||
// (1), or the 9x15 (2, the 4.2" 400x300).
|
||||
// Without it a landscape panel doubles the 6x9 (every pixel 2x2) -- for small
|
||||
// dense panels where 8x13 would be too fine. A portrait panel always uses the
|
||||
// 6x9: its narrow width wants the smaller cell.
|
||||
|
||||
@@ -4,7 +4,13 @@
|
||||
|
||||
#include "EinkGfxDisplay.h"
|
||||
#include "MiscFixedRenderer.h"
|
||||
#include "MiscFixed8x13Font.h"
|
||||
#if EINK_LARGE_FONT == 2
|
||||
#include "MiscFixed9x15Font.h"
|
||||
#define EINK_LARGE_GFXFONT MiscFixed9x15
|
||||
#else
|
||||
#include "MiscFixed8x13Font.h"
|
||||
#define EINK_LARGE_GFXFONT MiscFixed8x13
|
||||
#endif
|
||||
|
||||
EinkGfxDisplay::EinkGfxDisplay(int w, int h, Adafruit_GFX& gfx, uint16_t ink, uint16_t paper)
|
||||
: DisplayDriver(w, h), _gfx(gfx), _ink(ink), _paper(paper), _curr(ink), _font(&MiscFixed) {
|
||||
@@ -13,7 +19,7 @@ EinkGfxDisplay::EinkGfxDisplay(int w, int h, Adafruit_GFX& gfx, uint16_t ink, ui
|
||||
|
||||
void EinkGfxDisplay::updateLayout() {
|
||||
const bool landscape = width() >= height();
|
||||
_font = (EINK_LARGE_FONT && landscape) ? &MiscFixed8x13 : &MiscFixed;
|
||||
_font = (EINK_LARGE_FONT && landscape) ? &EINK_LARGE_GFXFONT : &MiscFixed;
|
||||
_px = (!EINK_LARGE_FONT && landscape) ? 2 : 1;
|
||||
_cell_w = miscFixedCellW(*_font);
|
||||
_cell_h = _font->yAdvance;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user