From e6001cc1b7b35cdb804861b9762afbd798894b63 Mon Sep 17 00:00:00 2001 From: Tuomas Kuosmanen Date: Wed, 7 Feb 2024 16:41:22 +0200 Subject: [PATCH 1/2] Added new gnc255 large font, changed layout to match --- GNC255/GNC255.cpp | 13 +++++++------ GNC255/fonts.h | 14 ++++++++++++++ 2 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 GNC255/fonts.h diff --git a/GNC255/GNC255.cpp b/GNC255/GNC255.cpp index ddb2af0..aaa37a2 100644 --- a/GNC255/GNC255.cpp +++ b/GNC255/GNC255.cpp @@ -2,13 +2,14 @@ #include #include "allocateMem.h" #include "commandmessenger.h" +#include "fonts.h" Layout ComLayout = { - {u8g2_font_logisoso22_tn, 22, {10, 32}}, - {u8g2_font_profont10_mr, 10, {0, 32}}, - {u8g2_font_profont12_mr, 13, {18, 45}}, - {u8g2_font_profont12_mr, 12, {107, 18}}, - {u8g2_font_profont12_mr, 12, {120, 18}}, + {gnc255frequency, 22, {31, 36}}, /* Value (frequency)*/ + {u8g2_font_4x6_mr, 6, {19, 32}}, /* ValueLabel (ACT/STB) */ + {u8g2_font_profont12_mr, 13, {33, 48}}, /* Valuelabel (active or standby label) */ + {u8g2_font_profont12_mr, 12, {116, 24}}, /* ModeComLabel (COM mode indicator) */ + {u8g2_font_profont12_mr, 12, {127, 24}}, /* ModeNavLabel (NAV mode indicator) */ }; Position OffsetActive = { @@ -16,7 +17,7 @@ Position OffsetActive = { 0}; Position OffsetStandby = { - 140, + 116, 0}; GNC255::GNC255(uint8_t clk, uint8_t data, uint8_t cs, uint8_t dc, uint8_t reset) diff --git a/GNC255/fonts.h b/GNC255/fonts.h new file mode 100644 index 0000000..3094891 --- /dev/null +++ b/GNC255/fonts.h @@ -0,0 +1,14 @@ +/* + Fontname: gnc255frequency + Copyright: Created with Fony 1.4.7 + Glyphs: 12/12 + BBX Build Mode: 0 +*/ +const uint8_t gnc255frequency[224] U8G2_FONT_SECTION("gnc255frequency") = + "\14\0\4\4\4\5\2\3\5\13\25\0\0\25\0\25\0\0\0\0\0\0\307.\6\63|\205\4/\5\0" + "\244\7\60\17+}\227\63)\134\331\377\312E\232#\0\61\14)\217\62\226\315\377\315\3\6\62\21+" + "}\227\63)\134\15\234n\376p\340\203\7\3\63\25+}\227\63)\134\15\234\315\241+\7Nh\312E" + "\232#\0\64\33+}\267q\304J\31\32\61f\310\64C\306\14\31\63\344\301\203a\3\347\11\0\65\23" + "+}\207\17\14\316\60\211\212\205\63\64\345\42\315\21\0\66\24+}\27$)T\14\234a\22\25\256\354" + "\312E\232#\0\67\20+}\207\17\6\316\216\30e\343\6\316\257\0\70\24+}\227\63)\134\331jD" + "\222,F\331\225\213\64G\0\71\23+}\227\63)\134\331\225\13%\11\347BE\22$\0\0\0\0"; From 6eb1ac8187158fbd19364fc42c45be024c9d830d Mon Sep 17 00:00:00 2001 From: Tuomas Kuosmanen Date: Sat, 10 Feb 2024 12:15:05 +0200 Subject: [PATCH 2/2] adjusted font margin to zero vertically --- GNC255/GNC255.cpp | 2 +- GNC255/fonts.h | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/GNC255/GNC255.cpp b/GNC255/GNC255.cpp index aaa37a2..f9521ee 100644 --- a/GNC255/GNC255.cpp +++ b/GNC255/GNC255.cpp @@ -5,7 +5,7 @@ #include "fonts.h" Layout ComLayout = { - {gnc255frequency, 22, {31, 36}}, /* Value (frequency)*/ + {gnc255frequency, 22, {31, 35}}, /* Value (frequency)*/ {u8g2_font_4x6_mr, 6, {19, 32}}, /* ValueLabel (ACT/STB) */ {u8g2_font_profont12_mr, 13, {33, 48}}, /* Valuelabel (active or standby label) */ {u8g2_font_profont12_mr, 12, {116, 24}}, /* ModeComLabel (COM mode indicator) */ diff --git a/GNC255/fonts.h b/GNC255/fonts.h index 3094891..a9d56e5 100644 --- a/GNC255/fonts.h +++ b/GNC255/fonts.h @@ -4,11 +4,13 @@ Glyphs: 12/12 BBX Build Mode: 0 */ -const uint8_t gnc255frequency[224] U8G2_FONT_SECTION("gnc255frequency") = - "\14\0\4\4\4\5\2\3\5\13\25\0\0\25\0\25\0\0\0\0\0\0\307.\6\63|\205\4/\5\0" - "\244\7\60\17+}\227\63)\134\331\377\312E\232#\0\61\14)\217\62\226\315\377\315\3\6\62\21+" - "}\227\63)\134\15\234n\376p\340\203\7\3\63\25+}\227\63)\134\15\234\315\241+\7Nh\312E" - "\232#\0\64\33+}\267q\304J\31\32\61f\310\64C\306\14\31\63\344\301\203a\3\347\11\0\65\23" - "+}\207\17\14\316\60\211\212\205\63\64\345\42\315\21\0\66\24+}\27$)T\14\234a\22\25\256\354" - "\312E\232#\0\67\20+}\207\17\6\316\216\30e\343\6\316\257\0\70\24+}\227\63)\134\331jD" - "\222,F\331\225\213\64G\0\71\23+}\227\63)\134\331\225\13%\11\347BE\22$\0\0\0\0"; +const uint8_t gnc255frequency[226] U8G2_FONT_SECTION("gnc255frequency") = + "\14\0\4\4\4\5\2\6\5\13\22\0\2\24\0\24\0\0\0\0\0\0\311.\6\63\24+$/\5\0" + "\244;\60\17+\25\273\234I\341\312\376W.\322\34\1\61\14)\27{\224\261l\376o\36\60\62\21+" + "\25\273\234I\341j\340t\363\207\3\37<\30\63\25+\25\273\234I\341j\340l\16]\71pBS." + "\322\34\1\64\33+\25\273\215#V\312\320\210\61C\246\31\62f\310\230!\17\36\14\33\70O\0\65\23" + "+\25;|`p\206IT,\234\241)\27i\216\0\66\24+\25\273 I\241b\340\14\223\250pe" + "W.\322\34\1\67\21+\25;|\60pv\304(\33\67p~\5\0\70\25+\25\273\234I\341\312V" + "#\222d\61\312\256\134\244\71\2\0\71\23+\25\273\234I\341\312\256\134(I\70\27*\222 \1\0\0" + "\0"; +