From: c vw Date: Fri, 27 Nov 2020 14:48:34 +0000 (+0100) Subject: Define display font and sizes at one spot X-Git-Url: https://git.rkrishnan.org/uri/vdrive/(%5B%5E?a=commitdiff_plain;h=5faab35823486f40db68304ae6b6fc9feafbecbf;p=pihpsdr.git Define display font and sizes at one spot --- diff --git a/radio.h b/radio.h index 3772e2c..2244ae6 100644 --- a/radio.h +++ b/radio.h @@ -26,6 +26,44 @@ #include "receiver.h" #include "transmitter.h" +// +// Fonts and sizes for VFO, meter, panadapter etc. +// +#ifdef ORIGINAL_PIHPSDR_DISPLAY_FONTS + +// +// This is the original pihpsdr variant +// +#define DISPLAY_FONT "FreeMono" +#define DISPLAY_FONT_SIZE1 10 +#define DISPLAY_FONT_SIZE2 12 +#define DISPLAY_FONT_SIZE3 16 +#define DISPLAY_FONT_SIZE4 22 + +#else +// +// The FreeMono font renders poorly for small font +// sizes, the Sans font does much better. +// +#define DISPLAY_FONT "Sans" + +// For some reason, one can use the original font +// sizes on Apple Macintosh but must use smaller +// ones on the RaspPi to get the same appearance. +// +#ifdef __APPLE__ +#define DISPLAY_FONT_SIZE1 10 +#define DISPLAY_FONT_SIZE2 12 +#define DISPLAY_FONT_SIZE3 16 +#define DISPLAY_FONT_SIZE4 22 +#else +#define DISPLAY_FONT_SIZE1 8 +#define DISPLAY_FONT_SIZE2 10 +#define DISPLAY_FONT_SIZE3 13 +#define DISPLAY_FONT_SIZE4 18 +#endif + +#endif #define NEW_MIC_IN 0x00 #define NEW_LINE_IN 0x01 #define NEW_MIC_BOOST 0x02