From 673d47d74347dcbc237ca3ea31db77355db2b679 Mon Sep 17 00:00:00 2001 From: vincent Date: Tue, 29 Sep 2020 08:38:52 +0200 Subject: [PATCH] fixed 0020 patch issue in linux and added new patch for increasing notification zone --- ...0_fbtft_SpiAsync_SoftRotation_Notifs.patch | 3152 ++++++++--------- ...creased-notification-zone-size-fbtft.patch | 25 + 2 files changed, 1601 insertions(+), 1576 deletions(-) create mode 100644 FunKey/board/funkey/patches/linux/0027-increased-notification-zone-size-fbtft.patch diff --git a/FunKey/board/funkey/patches/linux/0020_fbtft_SpiAsync_SoftRotation_Notifs.patch b/FunKey/board/funkey/patches/linux/0020_fbtft_SpiAsync_SoftRotation_Notifs.patch index 94c0610..78e065d 100644 --- a/FunKey/board/funkey/patches/linux/0020_fbtft_SpiAsync_SoftRotation_Notifs.patch +++ b/FunKey/board/funkey/patches/linux/0020_fbtft_SpiAsync_SoftRotation_Notifs.patch @@ -76,1587 +76,1587 @@ index 0000000..9f873b5 --- /dev/null +++ b/drivers/staging/fbtft/fb_text.c @@ -0,0 +1,1550 @@ -+#include "fb_text.h" -+ -+#define AT(x, y) (y)*W+(x) -+#define MIN(a,b) (((a)<(b))?(a):(b)) -+#define MAX(a,b) (((a)>(b))?(a):(b)) -+ -+ -+ -+static u8 monaco_font[] = { -+ -+/* -+..... -+..... -+..... -+..... -+..... -+..... -+..... -+..... -+ */ 0x00,0x00,0x00,0x00,0x00, -+ -+/* -+#.... -+#.... -+#.... -+#.... -+#.... -+..... -+#.... -+..... -+ !*/ 0x21,0x84,0x10,0x40,0x00, -+ -+/* -+#.#.. -+#.#.. -+..... -+..... -+..... -+..... -+..... -+..... -+ "*/ 0xa5,0x00,0x00,0x00,0x00, -+ -+/* -+..##. -+..##. -+##### -+.#.#. -+##### -+.##.. -+.##.. -+..... -+ #*/ 0x8c,0x7d,0xf5,0x8d,0x01, -+ -+/* -+..#.. -+.#### -+#.#.. -+#.#.. -+.##.. -+..### -+..#.# -+####. -+ $*/ 0xc4,0x97,0x62,0x38,0x7d, -+ -+/* -+#...# -+##..# -+#..#. -+..#.. -+..##. -+.#.## -+#..#. -+..... -+ %*/ 0x71,0x26,0xc2,0x74,0x02, -+ -+/* -+.#... -+#.#.. -+#.#.. -+.#... -+#.##. -+#..#. -+.###. -+..... -+ &*/ 0xa2,0x14,0xd1,0x92,0x03, -+ -+/* -+#.... -+#.... -+..... -+..... -+..... -+..... -+..... -+..... -+ '*/ 0x21,0x00,0x00,0x00,0x00, -+ -+/* -+..#.. -+.#... -+#.... -+#.... -+#.... -+#.... -+.#... -+..#.. -+ (*/ 0x44,0x84,0x10,0x82,0x20, -+ -+/* -+#.... -+.#... -+..#.. -+..#.. -+..#.. -+..#.. -+.#... -+#.... -+ )*/ 0x41,0x10,0x42,0x88,0x08, -+ -+/* -+.#... -+###.. -+###.. -+.#... -+..... -+..... -+..... -+..... -+ **/ 0xe2,0x1c,0x01,0x00,0x00, -+ -+/* -+..#.. -+..#.. -+##### -+..#.. -+..#.. -+..... -+..... -+..... -+ +*/ 0x84,0x7c,0x42,0x00,0x00, -+ -+/* -+#.... -+#.... -+#.... -+..... -+..... -+..... -+..... -+..... -+ ,*/ 0x21,0x04,0x00,0x00,0x00, -+ -+/* -+###.. -+..... -+..... -+..... -+..... -+..... -+..... -+..... -+ -*/ 0x07,0x00,0x00,0x00,0x00, -+ -+/* -+#.... -+..... -+..... -+..... -+..... -+..... -+..... -+..... -+ .*/ 0x01,0x00,0x00,0x00,0x00, -+ -+/* -+...#. -+...#. -+..#.. -+.#... -+.#... -+#.... -+..... -+..... -+ /*/ 0x08,0x11,0x21,0x02,0x00, -+ -+/* -+.##.. -+#.##. -+#.##. -+##.#. -+##.#. -+##.#. -+.##.. -+..... -+ 0*/ 0xa6,0xb5,0xb5,0x96,0x01, -+ -+/* -+.#... -+##... -+.#... -+.#... -+.#... -+.#... -+###.. -+..... -+ 1*/ 0x62,0x08,0x21,0xc4,0x01, -+ -+/* -+###.. -+...#. -+...#. -+..#.. -+.#... -+#.... -+####. -+..... -+ 2*/ 0x07,0x21,0x22,0xc2,0x03, -+ -+/* -+###.. -+...#. -+...#. -+.##.. -+...#. -+...#. -+###.. -+..... -+ 3*/ 0x07,0x21,0x83,0xd0,0x01, -+ -+/* -+...#. -+..##. -+.#.#. -+#..#. -+##### -+...#. -+...#. -+..... -+ 4*/ 0x88,0xa9,0xf4,0x11,0x02, -+ -+/* -+####. -+#.... -+###.. -+...#. -+...#. -+...#. -+###.. -+..... -+ 5*/ 0x2f,0x1c,0x84,0xd0,0x01, -+ -+/* -+.##.. -+#.... -+#.#.. -+##.#. -+##.#. -+##.#. -+.##.. -+..... -+ 6*/ 0x26,0x94,0xb5,0x96,0x01, -+ -+/* -+####. -+...#. -+...#. -+..#.. -+.##.. -+.#... -+.#... -+..... -+ 7*/ 0x0f,0x21,0x62,0x84,0x00, -+ -+/* -+.###. -+#..#. -+#..#. -+.##.. -+#..#. -+#..#. -+###.. -+..... -+ 8*/ 0x2e,0x25,0x93,0xd2,0x01, -+ -+/* -+.##.. -+#..#. -+#..#. -+#..#. -+.###. -+...#. -+.##.. -+..... -+ 9*/ 0x26,0xa5,0xe4,0x90,0x01, -+ -+/* -+#.... -+..... -+..... -+..... -+#.... -+..... -+..... -+..... -+ :*/ 0x01,0x00,0x10,0x00,0x00, -+ -+/* -+#.... -+..... -+..... -+..... -+#.... -+#.... -+#.... -+..... -+ ;*/ 0x01,0x00,0x10,0x42,0x00, -+ -+/* -+....# -+..##. -+##... -+..##. -+....# -+..... -+..... -+..... -+ <*/ 0x90,0x0d,0x06,0x01,0x00, -+ -+/* -+####. -+..... -+####. -+..... -+..... -+..... -+..... -+..... -+ =*/ 0x0f,0x3c,0x00,0x00,0x00, -+ -+/* -+#.... -+.##.. -+...## -+.##.. -+#.... -+..... -+..... -+..... -+ >*/ 0xc1,0x60,0x13,0x00,0x00, -+ -+/* -+###.. -+..#.. -+..#.. -+.#... -+.#... -+..... -+.#... -+..... -+ ?*/ 0x87,0x10,0x21,0x80,0x00, -+ -+/* -+.###. -+#...# -+#.### -+##.## -+##.## -+#.##. -+.##.. -+..... -+ @*/ 0x2e,0xf6,0xbd,0x9b,0x01, -+ -+/* -+.##.. -+.##.. -+.##.. -+.##.. -+####. -+####. -+#..#. -+..... -+ A*/ 0xc6,0x18,0xf3,0x5e,0x02, -+ -+/* -+##... -+#.#.. -+#.#.. -+##... -+#.#.. -+#.#.. -+##... -+..... -+ B*/ 0xa3,0x94,0x51,0xca,0x00, -+ -+/* -+.###. -+#.... -+#.... -+#.... -+#.... -+#.... -+.###. -+..... -+ C*/ 0x2e,0x84,0x10,0x82,0x03, -+ -+/* -+###.. -+#..#. -+#..#. -+#..#. -+#..#. -+#..#. -+###.. -+..... -+ D*/ 0x27,0xa5,0x94,0xd2,0x01, -+ -+/* -+####. -+#.... -+#.... -+####. -+#.... -+#.... -+####. -+..... -+ E*/ 0x2f,0x84,0x17,0xc2,0x03, -+ -+/* -+####. -+#.... -+#.... -+####. -+#.... -+#.... -+#.... -+..... -+ F*/ 0x2f,0x84,0x17,0x42,0x00, -+ -+/* -+.###. -+#.... -+#.... -+#.##. -+#..#. -+#..#. -+.###. -+..... -+ G*/ 0x2e,0x84,0x96,0x92,0x03, -+ -+/* -+#..#. -+#..#. -+#..#. -+####. -+#..#. -+#..#. -+#..#. -+..... -+ H*/ 0x29,0xa5,0x97,0x52,0x02, -+ -+/* -+###.. -+.#... -+.#... -+.#... -+.#... -+.#... -+###.. -+..... -+ I*/ 0x47,0x08,0x21,0xc4,0x01, -+ -+/* -+.###. -+...#. -+...#. -+...#. -+...#. -+...#. -+###.. -+..... -+ J*/ 0x0e,0x21,0x84,0xd0,0x01, -+ -+/* -+#..#. -+#..#. -+#.#.. -+##... -+#.#.. -+#.#.. -+#..#. -+..... -+ K*/ 0x29,0x95,0x51,0x4a,0x02, -+ -+/* -+#.... -+#.... -+#.... -+#.... -+#.... -+#.... -+###.. -+..... -+ L*/ 0x21,0x84,0x10,0xc2,0x01, -+ -+/* -+##.## -+##.## -+##.## -+##.## -+###.# -+#.#.# -+#...# -+..... -+ M*/ 0x7b,0xef,0x7d,0x6b,0x04, -+ -+/* -+#..#. -+##.#. -+##.#. -+#.##. -+#.##. -+#.##. -+#..#. -+..... -+ N*/ 0x69,0xad,0xd6,0x5a,0x02, -+ -+/* -+.##.. -+#..#. -+#..#. -+#..#. -+#..#. -+#..#. -+.##.. -+..... -+ O*/ 0x26,0xa5,0x94,0x92,0x01, -+ -+/* -+###.. -+#..#. -+#..#. -+#..#. -+###.. -+#.... -+#.... -+..... -+ P*/ 0x27,0xa5,0x74,0x42,0x00, -+ -+/* -+.##.. -+#..#. -+#..#. -+#..#. -+#..#. -+#..#. -+.##.. -+..#.. -+ Q*/ 0x26,0xa5,0x94,0x92,0x21, -+ -+/* -+##... -+#.#.. -+#.#.. -+##... -+##... -+#.#.. -+#.#.. -+..... -+ R*/ 0xa3,0x94,0x31,0x4a,0x01, -+ -+/* -+###.. -+#.... -+#.... -+.#... -+..#.. -+..#.. -+###.. -+..... -+ S*/ 0x27,0x04,0x41,0xc8,0x01, -+ -+/* -+##### -+..#.. -+..#.. -+..#.. -+..#.. -+..#.. -+..#.. -+..... -+ T*/ 0x9f,0x10,0x42,0x08,0x01, -+ -+/* -+#..#. -+#..#. -+#..#. -+#..#. -+#..#. -+#..#. -+.##.. -+..... -+ U*/ 0x29,0xa5,0x94,0x92,0x01, -+ -+/* -+#.#.. -+#.#.. -+#.#.. -+#.#.. -+#.#.. -+.#... -+.#... -+..... -+ V*/ 0xa5,0x94,0x52,0x84,0x00, -+ -+/* -+#.#.# -+#.#.# -+###.# -+##.## -+.#.#. -+.#.#. -+.#.#. -+..... -+ W*/ 0xb5,0xde,0xad,0x94,0x02, -+ -+/* -+.#.#. -+.#.#. -+..#.. -+..#.. -+..#.. -+.#.#. -+.#.#. -+..... -+ X*/ 0x4a,0x11,0x42,0x94,0x02, -+ -+/* -+#.#.. -+#.#.. -+#.#.. -+.#... -+.#... -+.#... -+.#... -+..... -+ Y*/ 0xa5,0x14,0x21,0x84,0x00, -+ -+/* -+####. -+...#. -+..#.. -+.#... -+.#... -+#.... -+####. -+..... -+ Z*/ 0x0f,0x11,0x21,0xc2,0x03, -+ -+/* -+###.. -+#.... -+#.... -+#.... -+#.... -+#.... -+#.... -+###.. -+ [*/ 0x27,0x84,0x10,0x42,0x38, -+ -+/* -+#.... -+#.... -+.#... -+.#... -+..#.. -+...#. -+..... -+..... -+ \*/ 0x21,0x08,0x41,0x10,0x00, -+ -+/* -+###.. -+..#.. -+..#.. -+..#.. -+..#.. -+..#.. -+..#.. -+###.. -+ ]*/ 0x87,0x10,0x42,0x08,0x39, -+ -+/* -+.#... -+.##.. -+.##.. -+#..#. -+..... -+..... -+..... -+..... -+ ^*/ 0xc2,0x98,0x04,0x00,0x00, -+ -+/* -+####. -+..... -+..... -+..... -+..... -+..... -+..... -+..... -+ _*/ 0x0f,0x00,0x00,0x00,0x00, -+ -+/* -+.#... -+..... -+..... -+..... -+..... -+..... -+..... -+..... -+ `*/ 0x02,0x00,0x00,0x00,0x00, -+ -+/* -+.#### -+#...# -+#...# -+#...# -+.#### -+..... -+..... -+..... -+ a*/ 0x3e,0xc6,0xe8,0x01,0x00, -+ -+/* -+#.... -+#.... -+####. -+#...# -+#...# -+#...# -+####. -+..... -+ b*/ 0x21,0xbc,0x18,0xe3,0x03, -+ -+/* -+.###. -+#.... -+#.... -+#.... -+.###. -+..... -+..... -+..... -+ c*/ 0x2e,0x84,0xe0,0x00,0x00, -+ -+/* -+...#. -+...#. -+.###. -+#..#. -+#..#. -+#..#. -+.###. -+..... -+ d*/ 0x08,0xb9,0x94,0x92,0x03, -+ -+/* -+.##.. -+#..#. -+####. -+#.... -+.###. -+..... -+..... -+..... -+ e*/ 0x26,0xbd,0xe0,0x00,0x00, -+ -+/* -+..### -+.#... -+####. -+.#... -+.#... -+.#... -+.#... -+..... -+ f*/ 0x5c,0x3c,0x21,0x84,0x00, -+ -+/* -+.###. -+#..#. -+#..#. -+#..#. -+.###. -+...#. -+###.. -+..... -+ g*/ 0x2e,0xa5,0xe4,0xd0,0x01, -+ -+/* -+#.... -+#.... -+###.. -+#..#. -+#..#. -+#..#. -+#..#. -+..... -+ h*/ 0x21,0x9c,0x94,0x52,0x02, -+ -+/* -+.#... -+..... -+##... -+.#... -+.#... -+.#... -+.##.. -+..... -+ i*/ 0x02,0x0c,0x21,0x84,0x01, -+ -+/* -+..#.. -+..... -+###.. -+..#.. -+..#.. -+..#.. -+..#.. -+..#.. -+ j*/ 0x04,0x1c,0x42,0x08,0x21, -+ -+/* -+#.... -+#.... -+#.#.. -+##... -+##... -+#.#.. -+#..#. -+..... -+ k*/ 0x21,0x94,0x31,0x4a,0x02, -+ -+/* -+##... -+.#... -+.#... -+.#... -+.#... -+.#... -+.##.. -+..... -+ l*/ 0x43,0x08,0x21,0x84,0x01, -+ -+/* -+##### -+#.#.# -+#.#.# -+#.#.# -+#.#.# -+..... -+..... -+..... -+ m*/ 0xbf,0xd6,0x5a,0x01,0x00, -+ -+/* -+###.. -+#..#. -+#..#. -+#..#. -+#..#. -+..... -+..... -+..... -+ n*/ 0x27,0xa5,0x94,0x00,0x00, -+ -+/* -+.##.. -+#..#. -+#..#. -+#..#. -+.##.. -+..... -+..... -+..... -+ o*/ 0x26,0xa5,0x64,0x00,0x00, -+ -+/* -+####. -+#...# -+#...# -+#...# -+####. -+#.... -+#.... -+..... -+ p*/ 0x2f,0xc6,0xf8,0x42,0x00, -+ -+/* -+.###. -+#..#. -+#..#. -+#..#. -+.###. -+...#. -+...#. -+..... -+ q*/ 0x2e,0xa5,0xe4,0x10,0x02, -+ -+/* -+###.. -+#.#.. -+#.... -+#.... -+#.... -+..... -+..... -+..... -+ r*/ 0xa7,0x84,0x10,0x00,0x00, -+ -+/* -+.###. -+#..#. -+.###. -+#..#. -+###.. -+..... -+..... -+..... -+ s*/ 0x2e,0xb9,0x74,0x00,0x00, -+ -+/* -+.#... -+.#... -+####. -+.#... -+.#... -+..##. -+..... -+..... -+ t*/ 0x42,0x3c,0x21,0x18,0x00, -+ -+/* -+#..#. -+#..#. -+#..#. -+#..#. -+.###. -+..... -+..... -+..... -+ u*/ 0x29,0xa5,0xe4,0x00,0x00, -+ -+/* -+#.#.. -+#.#.. -+#.#.. -+###.. -+.#... -+..... -+..... -+..... -+ v*/ 0xa5,0x94,0x23,0x00,0x00, -+ -+/* -+#.#.# -+###.# -+###.# -+####. -+.#.#. -+..... -+..... -+..... -+ w*/ 0xf5,0xde,0xa7,0x00,0x00, -+ -+/* -+.#.#. -+.##.. -+..#.. -+.#.#. -+.#.#. -+..... -+..... -+..... -+ x*/ 0xca,0x10,0xa5,0x00,0x00, -+ -+/* -+.#.#. -+.#.#. -+.#.#. -+..##. -+..#.. -+..#.. -+##... -+..... -+ y*/ 0x4a,0x29,0x46,0xc8,0x00, -+ -+/* -+####. -+..#.. -+.#... -+#.... -+####. -+..... -+..... -+..... -+ z*/ 0x8f,0x88,0xf0,0x00,0x00, -+ -+/* -+.##.. -+.#... -+.#... -+.#... -+#.... -+.#... -+.#... -+.##.. -+ {*/ 0x46,0x08,0x11,0x84,0x30, -+ -+/* -+#.... -+#.... -+#.... -+#.... -+#.... -+#.... -+..... -+..... -+ |*/ 0x21,0x84,0x10,0x02,0x00, -+ -+/* -+##... -+.#... -+.#... -+.#... -+..#.. -+.#... -+.#... -+##... -+ }*/ 0x43,0x08,0x41,0x84,0x18, -+ -+/* -+##### -+..... -+..... -+..... -+..... -+..... -+..... -+..... -+ ~*/ 0x1f,0x00,0x00,0x00,0x00, -+ -+}; -+ -+//static u8 monaco_font_outline[127*MONACO_BYTES_PER_CHAR] = {}; -+ -+static const s8 monaco_height_adjust[] = { -+ 6,-1,-1,-1,-2,-1,-1,-1,-1,-1,-1,1,5,3,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,2,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6,0,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,-1,-1,-1,4, -+}; -+ -+unsigned char fontdata8x8[64*16] = -+{ -+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -+ 0x3C,0x42,0x99,0xBD,0xBD,0x99,0x42,0x3C,0x3C,0x42,0x81,0x81,0x81,0x81,0x42,0x3C, -+ 0xFE,0x82,0x8A,0xD2,0xA2,0x82,0xFE,0x00,0xFE,0x82,0x82,0x82,0x82,0x82,0xFE,0x00, -+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x64,0x74,0x7C,0x38,0x00,0x00, -+ 0x80,0xC0,0xF0,0xFC,0xF0,0xC0,0x80,0x00,0x01,0x03,0x0F,0x3F,0x0F,0x03,0x01,0x00, -+ 0x18,0x3C,0x7E,0x18,0x7E,0x3C,0x18,0x00,0xEE,0xEE,0xEE,0xCC,0x00,0xCC,0xCC,0x00, -+ 0x00,0x00,0x30,0x68,0x78,0x30,0x00,0x00,0x00,0x38,0x64,0x74,0x7C,0x38,0x00,0x00, -+ 0x3C,0x66,0x7A,0x7A,0x7E,0x7E,0x3C,0x00,0x0E,0x3E,0x3A,0x22,0x26,0x6E,0xE4,0x40, -+ 0x18,0x3C,0x7E,0x3C,0x3C,0x3C,0x3C,0x00,0x3C,0x3C,0x3C,0x3C,0x7E,0x3C,0x18,0x00, -+ 0x08,0x7C,0x7E,0x7E,0x7C,0x08,0x00,0x00,0x10,0x3E,0x7E,0x7E,0x3E,0x10,0x00,0x00, -+ 0x58,0x2A,0xDC,0xC8,0xDC,0x2A,0x58,0x00,0x24,0x66,0xFF,0xFF,0x66,0x24,0x00,0x00, -+ 0x00,0x10,0x10,0x38,0x38,0x7C,0xFE,0x00,0xFE,0x7C,0x38,0x38,0x10,0x10,0x00,0x00, -+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x1C,0x1C,0x18,0x00,0x18,0x18,0x00, -+ 0x6C,0x6C,0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x7C,0x28,0x7C,0x28,0x00,0x00, -+ 0x10,0x38,0x60,0x38,0x0C,0x78,0x10,0x00,0x40,0xA4,0x48,0x10,0x24,0x4A,0x04,0x00, -+ 0x18,0x34,0x18,0x3A,0x6C,0x66,0x3A,0x00,0x18,0x18,0x20,0x00,0x00,0x00,0x00,0x00, -+ 0x30,0x60,0x60,0x60,0x60,0x60,0x30,0x00,0x0C,0x06,0x06,0x06,0x06,0x06,0x0C,0x00, -+ 0x10,0x54,0x38,0x7C,0x38,0x54,0x10,0x00,0x00,0x18,0x18,0x7E,0x18,0x18,0x00,0x00, -+ 0x00,0x00,0x00,0x00,0x18,0x18,0x30,0x00,0x00,0x00,0x00,0x00,0x3E,0x00,0x00,0x00, -+ 0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x04,0x08,0x10,0x20,0x40,0x00,0x00, -+ 0x38,0x4C,0xC6,0xC6,0xC6,0x64,0x38,0x00,0x18,0x38,0x18,0x18,0x18,0x18,0x7E,0x00, -+ 0x7C,0xC6,0x0E,0x3C,0x78,0xE0,0xFE,0x00,0x7E,0x0C,0x18,0x3C,0x06,0xC6,0x7C,0x00, -+ 0x1C,0x3C,0x6C,0xCC,0xFE,0x0C,0x0C,0x00,0xFC,0xC0,0xFC,0x06,0x06,0xC6,0x7C,0x00, -+ 0x3C,0x60,0xC0,0xFC,0xC6,0xC6,0x7C,0x00,0xFE,0xC6,0x0C,0x18,0x30,0x30,0x30,0x00, -+ 0x78,0xC4,0xE4,0x78,0x86,0x86,0x7C,0x00,0x7C,0xC6,0xC6,0x7E,0x06,0x0C,0x78,0x00, -+ 0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x18,0x18,0x30, -+ 0x1C,0x38,0x70,0xE0,0x70,0x38,0x1C,0x00,0x00,0x7C,0x00,0x00,0x7C,0x00,0x00,0x00, -+ 0x70,0x38,0x1C,0x0E,0x1C,0x38,0x70,0x00,0x7C,0xC6,0xC6,0x1C,0x18,0x00,0x18,0x00, -+ 0x3C,0x42,0x99,0xA1,0xA5,0x99,0x42,0x3C,0x38,0x6C,0xC6,0xC6,0xFE,0xC6,0xC6,0x00, -+ 0xFC,0xC6,0xC6,0xFC,0xC6,0xC6,0xFC,0x00,0x3C,0x66,0xC0,0xC0,0xC0,0x66,0x3C,0x00, -+ 0xF8,0xCC,0xC6,0xC6,0xC6,0xCC,0xF8,0x00,0xFE,0xC0,0xC0,0xFC,0xC0,0xC0,0xFE,0x00, -+ 0xFE,0xC0,0xC0,0xFC,0xC0,0xC0,0xC0,0x00,0x3E,0x60,0xC0,0xCE,0xC6,0x66,0x3E,0x00, -+ 0xC6,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0x00,0x7E,0x18,0x18,0x18,0x18,0x18,0x7E,0x00, -+ 0x06,0x06,0x06,0x06,0xC6,0xC6,0x7C,0x00,0xC6,0xCC,0xD8,0xF0,0xF8,0xDC,0xCE,0x00, -+ 0x60,0x60,0x60,0x60,0x60,0x60,0x7E,0x00,0xC6,0xEE,0xFE,0xFE,0xD6,0xC6,0xC6,0x00, -+ 0xC6,0xE6,0xF6,0xFE,0xDE,0xCE,0xC6,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00, -+ 0xFC,0xC6,0xC6,0xC6,0xFC,0xC0,0xC0,0x00,0x7C,0xC6,0xC6,0xC6,0xDE,0xCC,0x7A,0x00, -+ 0xFC,0xC6,0xC6,0xCE,0xF8,0xDC,0xCE,0x00,0x78,0xCC,0xC0,0x7C,0x06,0xC6,0x7C,0x00, -+ 0x7E,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00, -+ 0xC6,0xC6,0xC6,0xEE,0x7C,0x38,0x10,0x00,0xC6,0xC6,0xD6,0xFE,0xFE,0xEE,0xC6,0x00, -+ 0xC6,0xEE,0x3C,0x38,0x7C,0xEE,0xC6,0x00,0x66,0x66,0x66,0x3C,0x18,0x18,0x18,0x00, -+ 0xFE,0x0E,0x1C,0x38,0x70,0xE0,0xFE,0x00,0x3C,0x30,0x30,0x30,0x30,0x30,0x3C,0x00, -+ 0x60,0x60,0x30,0x18,0x0C,0x06,0x06,0x00,0x3C,0x0C,0x0C,0x0C,0x0C,0x0C,0x3C,0x00, -+ 0x18,0x3C,0x66,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF, -+ 0x30,0x30,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x06,0x3E,0x66,0x66,0x3C,0x00, -+ 0x60,0x7C,0x66,0x66,0x66,0x66,0x7C,0x00,0x00,0x3C,0x66,0x60,0x60,0x66,0x3C,0x00, -+ 0x06,0x3E,0x66,0x66,0x66,0x66,0x3E,0x00,0x00,0x3C,0x66,0x66,0x7E,0x60,0x3C,0x00, -+ 0x1C,0x30,0x78,0x30,0x30,0x30,0x30,0x00,0x00,0x3E,0x66,0x66,0x66,0x3E,0x06,0x3C, -+ 0x60,0x7C,0x76,0x66,0x66,0x66,0x66,0x00,0x18,0x00,0x38,0x18,0x18,0x18,0x18,0x00, -+ 0x0C,0x00,0x1C,0x0C,0x0C,0x0C,0x0C,0x38,0x60,0x60,0x66,0x6C,0x78,0x6C,0x66,0x00, -+ 0x38,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0xEC,0xFE,0xFE,0xFE,0xD6,0xC6,0x00, -+ 0x00,0x7C,0x76,0x66,0x66,0x66,0x66,0x00,0x00,0x3C,0x66,0x66,0x66,0x66,0x3C,0x00, -+ 0x00,0x7C,0x66,0x66,0x66,0x7C,0x60,0x60,0x00,0x3E,0x66,0x66,0x66,0x3E,0x06,0x06, -+ 0x00,0x7E,0x70,0x60,0x60,0x60,0x60,0x00,0x00,0x3C,0x60,0x3C,0x06,0x66,0x3C,0x00, -+ 0x30,0x78,0x30,0x30,0x30,0x30,0x1C,0x00,0x00,0x66,0x66,0x66,0x66,0x6E,0x3E,0x00, -+ 0x00,0x66,0x66,0x66,0x66,0x3C,0x18,0x00,0x00,0xC6,0xD6,0xFE,0xFE,0x7C,0x6C,0x00, -+ 0x00,0x66,0x3C,0x18,0x3C,0x66,0x66,0x00,0x00,0x66,0x66,0x66,0x66,0x3E,0x06,0x3C, -+ 0x00,0x7E,0x0C,0x18,0x30,0x60,0x7E,0x00,0x0E,0x18,0x0C,0x38,0x0C,0x18,0x0E,0x00, -+ 0x18,0x18,0x18,0x00,0x18,0x18,0x18,0x00,0x70,0x18,0x30,0x1C,0x30,0x18,0x70,0x00, -+ 0x00,0x00,0x76,0xDC,0x00,0x00,0x00,0x00,0x10,0x28,0x10,0x54,0xAA,0x44,0x00,0x00, -+}; -+ -+ -+/* The font is generated from Xorg clR5x8.bdf */ -+/* -+COMMENT Copyright 1989 Dale Schumacher, dal@syntel.mn.org -+COMMENT 399 Beacon Ave. -+COMMENT St. Paul, MN 55104-3527 -+COMMENT -+COMMENT Permission to use, copy, modify, and distribute this software and -+COMMENT its documentation for any purpose and without fee is hereby -+COMMENT granted, provided that the above copyright notice appear in all -+COMMENT copies and that both that copyright notice and this permission -+COMMENT notice appear in supporting documentation, and that the name of -+COMMENT Dale Schumacher not be used in advertising or publicity pertaining to -+COMMENT distribution of the software without specific, written prior -+COMMENT permission. Dale Schumacher makes no representations about the -+COMMENT suitability of this software for any purpose. It is provided "as -+COMMENT is" without express or implied warranty. -+COMMENT -+*/ -+unsigned char fontdata6x8[256][8] = { -+{ 0x7c>>2, 0x44>>2, 0x7c>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0xff>>2, 0x7c>>2, }, -+{ 0x00>>2, 0x00>>2, 0x10>>2, 0x28>>2, 0x44>>2, 0x7c>>2, 0x44>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x78>>2, 0x44>>2, 0x78>>2, 0x44>>2, 0x78>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x38>>2, 0x44>>2, 0x40>>2, 0x44>>2, 0x38>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x78>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x78>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x7c>>2, 0x40>>2, 0x78>>2, 0x40>>2, 0x7c>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x7c>>2, 0x40>>2, 0x78>>2, 0x40>>2, 0x40>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x3c>>2, 0x40>>2, 0x4c>>2, 0x44>>2, 0x3c>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x44>>2, 0x44>>2, 0x7c>>2, 0x44>>2, 0x44>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x38>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x38>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x1c>>2, 0x04>>2, 0x04>>2, 0x44>>2, 0x38>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x48>>2, 0x50>>2, 0x60>>2, 0x50>>2, 0x48>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x40>>2, 0x40>>2, 0x40>>2, 0x40>>2, 0x7c>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x44>>2, 0x6c>>2, 0x54>>2, 0x54>>2, 0x44>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x44>>2, 0x64>>2, 0x54>>2, 0x4c>>2, 0x44>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x38>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x38>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x78>>2, 0x44>>2, 0x78>>2, 0x40>>2, 0x40>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x38>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x38>>2, 0x0c>>2, }, -+{ 0x00>>2, 0x00>>2, 0x78>>2, 0x44>>2, 0x78>>2, 0x50>>2, 0x4c>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x3c>>2, 0x40>>2, 0x38>>2, 0x04>>2, 0x78>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x7c>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x38>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x44>>2, 0x44>>2, 0x28>>2, 0x28>>2, 0x10>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x44>>2, 0x54>>2, 0x54>>2, 0x6c>>2, 0x44>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x44>>2, 0x28>>2, 0x10>>2, 0x28>>2, 0x44>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x44>>2, 0x28>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x7c>>2, 0x08>>2, 0x10>>2, 0x20>>2, 0x7c>>2, 0x00>>2, }, -+{ 0xe0>>2, 0x80>>2, 0xe0>>2, 0x8c>>2, 0xf0>>2, 0x10>>2, 0x10>>2, 0x0c>>2, }, -+{ 0x00>>2, 0x10>>2, 0x38>>2, 0x7c>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x00>>2, }, -+{ 0x00>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x7c>>2, 0x38>>2, 0x10>>2, 0x00>>2, }, -+{ 0x00>>2, 0x10>>2, 0x18>>2, 0xfc>>2, 0x18>>2, 0x10>>2, 0x00>>2, 0x00>>2, }, -+{ 0x00>>2, 0x20>>2, 0x60>>2, 0xfc>>2, 0x60>>2, 0x20>>2, 0x00>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, }, -+{ 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x00>>2, 0x10>>2, 0x00>>2, }, -+{ 0x28>>2, 0x28>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, }, -+{ 0x00>>2, 0x28>>2, 0x7c>>2, 0x28>>2, 0x7c>>2, 0x28>>2, 0x00>>2, 0x00>>2, }, -+{ 0x10>>2, 0x3c>>2, 0x50>>2, 0x38>>2, 0x14>>2, 0x78>>2, 0x10>>2, 0x00>>2, }, -+{ 0x60>>2, 0x64>>2, 0x08>>2, 0x10>>2, 0x20>>2, 0x4c>>2, 0x0c>>2, 0x00>>2, }, -+{ 0x38>>2, 0x40>>2, 0x40>>2, 0x20>>2, 0x54>>2, 0x48>>2, 0x34>>2, 0x00>>2, }, -+{ 0x10>>2, 0x20>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, }, -+{ 0x04>>2, 0x08>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x08>>2, 0x04>>2, 0x00>>2, }, -+{ 0x40>>2, 0x20>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x20>>2, 0x40>>2, 0x00>>2, }, -+{ 0x00>>2, 0x10>>2, 0x54>>2, 0x38>>2, 0x54>>2, 0x10>>2, 0x00>>2, 0x00>>2, }, -+{ 0x00>>2, 0x10>>2, 0x10>>2, 0x7c>>2, 0x10>>2, 0x10>>2, 0x00>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x10>>2, 0x10>>2, 0x20>>2, }, -+{ 0x00>>2, 0x00>>2, 0x00>>2, 0x7c>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x10>>2, 0x10>>2, 0x00>>2, }, -+{ 0x04>>2, 0x04>>2, 0x08>>2, 0x08>>2, 0x10>>2, 0x10>>2, 0x20>>2, 0x20>>2, }, -+{ 0x38>>2, 0x44>>2, 0x4c>>2, 0x54>>2, 0x64>>2, 0x44>>2, 0x38>>2, 0x00>>2, }, -+{ 0x10>>2, 0x30>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x00>>2, }, -+{ 0x38>>2, 0x44>>2, 0x04>>2, 0x08>>2, 0x10>>2, 0x20>>2, 0x7c>>2, 0x00>>2, }, -+{ 0x38>>2, 0x44>>2, 0x04>>2, 0x18>>2, 0x04>>2, 0x44>>2, 0x38>>2, 0x00>>2, }, -+{ 0x18>>2, 0x18>>2, 0x28>>2, 0x28>>2, 0x7c>>2, 0x08>>2, 0x1c>>2, 0x00>>2, }, -+{ 0x7c>>2, 0x40>>2, 0x78>>2, 0x04>>2, 0x04>>2, 0x44>>2, 0x38>>2, 0x00>>2, }, -+{ 0x18>>2, 0x20>>2, 0x40>>2, 0x78>>2, 0x44>>2, 0x44>>2, 0x38>>2, 0x00>>2, }, -+{ 0x7c>>2, 0x44>>2, 0x04>>2, 0x08>>2, 0x08>>2, 0x10>>2, 0x10>>2, 0x00>>2, }, -+{ 0x38>>2, 0x44>>2, 0x44>>2, 0x38>>2, 0x44>>2, 0x44>>2, 0x38>>2, 0x00>>2, }, -+{ 0x38>>2, 0x44>>2, 0x44>>2, 0x3c>>2, 0x04>>2, 0x08>>2, 0x30>>2, 0x00>>2, }, -+{ 0x00>>2, 0x10>>2, 0x10>>2, 0x00>>2, 0x00>>2, 0x10>>2, 0x10>>2, 0x00>>2, }, -+{ 0x00>>2, 0x10>>2, 0x10>>2, 0x00>>2, 0x00>>2, 0x10>>2, 0x10>>2, 0x20>>2, }, -+{ 0x00>>2, 0x0c>>2, 0x30>>2, 0xc0>>2, 0x30>>2, 0x0c>>2, 0x00>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x7c>>2, 0x00>>2, 0x7c>>2, 0x00>>2, 0x00>>2, 0x00>>2, }, -+{ 0x00>>2, 0xc0>>2, 0x30>>2, 0x0c>>2, 0x30>>2, 0xc0>>2, 0x00>>2, 0x00>>2, }, -+{ 0x38>>2, 0x44>>2, 0x04>>2, 0x08>>2, 0x10>>2, 0x00>>2, 0x10>>2, 0x00>>2, }, -+{ 0x38>>2, 0x44>>2, 0x5c>>2, 0x5c>>2, 0x58>>2, 0x40>>2, 0x38>>2, 0x00>>2, }, -+{ 0x10>>2, 0x28>>2, 0x44>>2, 0x44>>2, 0x7c>>2, 0x44>>2, 0x44>>2, 0x00>>2, }, -+{ 0x78>>2, 0x44>>2, 0x44>>2, 0x78>>2, 0x44>>2, 0x44>>2, 0x78>>2, 0x00>>2, }, -+{ 0x38>>2, 0x44>>2, 0x40>>2, 0x40>>2, 0x40>>2, 0x44>>2, 0x38>>2, 0x00>>2, }, -+{ 0x70>>2, 0x48>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x48>>2, 0x70>>2, 0x00>>2, }, -+{ 0x7c>>2, 0x40>>2, 0x40>>2, 0x78>>2, 0x40>>2, 0x40>>2, 0x7c>>2, 0x00>>2, }, -+{ 0x7c>>2, 0x40>>2, 0x40>>2, 0x78>>2, 0x40>>2, 0x40>>2, 0x40>>2, 0x00>>2, }, -+{ 0x38>>2, 0x44>>2, 0x40>>2, 0x4c>>2, 0x44>>2, 0x44>>2, 0x3c>>2, 0x00>>2, }, -+{ 0x44>>2, 0x44>>2, 0x44>>2, 0x7c>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x00>>2, }, -+{ 0x7c>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x7c>>2, 0x00>>2, }, -+{ 0x1c>>2, 0x04>>2, 0x04>>2, 0x04>>2, 0x44>>2, 0x44>>2, 0x38>>2, 0x00>>2, }, -+{ 0x44>>2, 0x48>>2, 0x50>>2, 0x60>>2, 0x50>>2, 0x48>>2, 0x44>>2, 0x00>>2, }, -+{ 0x40>>2, 0x40>>2, 0x40>>2, 0x40>>2, 0x40>>2, 0x40>>2, 0x7c>>2, 0x00>>2, }, -+{ 0x44>>2, 0x6c>>2, 0x54>>2, 0x54>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x00>>2, }, -+{ 0x44>>2, 0x64>>2, 0x64>>2, 0x54>>2, 0x4c>>2, 0x4c>>2, 0x44>>2, 0x00>>2, }, -+{ 0x38>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x38>>2, 0x00>>2, }, -+{ 0x78>>2, 0x44>>2, 0x44>>2, 0x78>>2, 0x40>>2, 0x40>>2, 0x40>>2, 0x00>>2, }, -+{ 0x38>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x38>>2, 0x0c>>2, }, -+{ 0x78>>2, 0x44>>2, 0x44>>2, 0x78>>2, 0x50>>2, 0x48>>2, 0x44>>2, 0x00>>2, }, -+{ 0x38>>2, 0x44>>2, 0x40>>2, 0x38>>2, 0x04>>2, 0x44>>2, 0x38>>2, 0x00>>2, }, -+{ 0x7c>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x00>>2, }, -+{ 0x44>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x38>>2, 0x00>>2, }, -+{ 0x44>>2, 0x44>>2, 0x44>>2, 0x28>>2, 0x28>>2, 0x10>>2, 0x10>>2, 0x00>>2, }, -+{ 0x44>>2, 0x44>>2, 0x44>>2, 0x54>>2, 0x54>>2, 0x6c>>2, 0x44>>2, 0x00>>2, }, -+{ 0x44>>2, 0x44>>2, 0x28>>2, 0x10>>2, 0x28>>2, 0x44>>2, 0x44>>2, 0x00>>2, }, -+{ 0x44>>2, 0x44>>2, 0x28>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x00>>2, }, -+{ 0x7c>>2, 0x04>>2, 0x08>>2, 0x10>>2, 0x20>>2, 0x40>>2, 0x7c>>2, 0x00>>2, }, -+{ 0x1c>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x1c>>2, 0x00>>2, }, -+{ 0x20>>2, 0x20>>2, 0x10>>2, 0x10>>2, 0x08>>2, 0x08>>2, 0x04>>2, 0x04>>2, }, -+{ 0x70>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x70>>2, 0x00>>2, }, -+{ 0x10>>2, 0x28>>2, 0x44>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0xfc>>2, 0x00>>2, }, -+{ 0x10>>2, 0x08>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x3c>>2, 0x44>>2, 0x44>>2, 0x4c>>2, 0x34>>2, 0x00>>2, }, -+{ 0x40>>2, 0x40>>2, 0x78>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x78>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x3c>>2, 0x40>>2, 0x40>>2, 0x40>>2, 0x3c>>2, 0x00>>2, }, -+{ 0x04>>2, 0x04>>2, 0x3c>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x3c>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x38>>2, 0x44>>2, 0x7c>>2, 0x40>>2, 0x38>>2, 0x00>>2, }, -+{ 0x1c>>2, 0x20>>2, 0x78>>2, 0x20>>2, 0x20>>2, 0x20>>2, 0x20>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x3c>>2, 0x44>>2, 0x44>>2, 0x3c>>2, 0x04>>2, 0x38>>2, }, -+{ 0x40>>2, 0x40>>2, 0x78>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x00>>2, }, -+{ 0x10>>2, 0x00>>2, 0x30>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x38>>2, 0x00>>2, }, -+{ 0x08>>2, 0x00>>2, 0x38>>2, 0x08>>2, 0x08>>2, 0x08>>2, 0x08>>2, 0x70>>2, }, -+{ 0x40>>2, 0x40>>2, 0x48>>2, 0x50>>2, 0x60>>2, 0x50>>2, 0x48>>2, 0x00>>2, }, -+{ 0x30>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x38>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x68>>2, 0x54>>2, 0x54>>2, 0x54>>2, 0x44>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x58>>2, 0x64>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x38>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x38>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x78>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x78>>2, 0x40>>2, }, -+{ 0x00>>2, 0x00>>2, 0x3c>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x3c>>2, 0x04>>2, }, -+{ 0x00>>2, 0x00>>2, 0x58>>2, 0x60>>2, 0x40>>2, 0x40>>2, 0x40>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x3c>>2, 0x40>>2, 0x38>>2, 0x04>>2, 0x78>>2, 0x00>>2, }, -+{ 0x10>>2, 0x10>>2, 0x7c>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x0c>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x4c>>2, 0x34>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x6c>>2, 0x28>>2, 0x28>>2, 0x10>>2, 0x10>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x44>>2, 0x54>>2, 0x54>>2, 0x54>>2, 0x28>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x44>>2, 0x28>>2, 0x10>>2, 0x28>>2, 0x44>>2, 0x00>>2, }, -+{ 0x00>>2, 0x00>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x3c>>2, 0x04>>2, 0x38>>2, }, -+{ 0x00>>2, 0x00>>2, 0x7c>>2, 0x08>>2, 0x10>>2, 0x20>>2, 0x7c>>2, 0x00>>2, }, -+{ 0x04>>2, 0x08>>2, 0x08>>2, 0x10>>2, 0x08>>2, 0x08>>2, 0x04>>2, 0x00>>2, }, -+{ 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x00>>2, }, -+{ 0x40>>2, 0x20>>2, 0x20>>2, 0x10>>2, 0x20>>2, 0x20>>2, 0x40>>2, 0x00>>2, }, -+{ 0x20>>2, 0x54>>2, 0x08>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, }, -+{ 0x00>>2, 0x10>>2, 0x10>>2, 0x28>>2, 0x28>>2, 0x44>>2, 0x7c>>2, 0x00>>2, }, -+}; -+ -+static void paint_bg(unsigned short *screen, int W, int y, int height, unsigned short bg_color){ -+ int x_bg, y_bg; -+ for(y_bg = y; y_bg < y+height; y_bg++){ -+ for(x_bg = 0; x_bg < W; x_bg++){ -+ screen[AT(x_bg, y_bg)] = bg_color; -+ } -+ } -+} -+ -+/* note: may use 1 extra pixel on the right */ -+void basic_text_out16_bg(void *fb, int w, int h, int x, int y, -+ unsigned short fg_color, unsigned short bg_color, const char *text) -+{ -+ int i, l; -+ int W = w; -+ int cur_line = 0; -+ unsigned short *screen; -+ unsigned short *screen_line_start; -+ unsigned short val = fg_color; -+ unsigned short font_width = 8; -+ unsigned short font_height = 8; -+ unsigned short y_padding_lines = 6; -+ -+ /* Paint background */ -+ paint_bg((unsigned short *)fb, W, y, y_padding_lines, bg_color); -+ -+ /* Draw chars */ -+ cur_line = y+y_padding_lines; -+ //printk("New line, y=%d\n", cur_line); -+ paint_bg((unsigned short *)fb, W, cur_line, font_height+y_padding_lines, bg_color); -+ screen = (unsigned short *)fb + x + cur_line * w; -+ screen_line_start = screen; -+ for (i = 0; ; i++, screen += font_width) -+ { -+ char c = text[i]; -+ //printk("c=%c,0x%02X,%d\n", c, c, c); -+ -+ if (c == 0) -+ break; -+ -+ if(screen >= screen_line_start + w || (c == '\n') || (c == '^')){ -+ cur_line += (font_height + y_padding_lines); -+ //printk("New line, y=%d\n", cur_line); -+ if(cur_line+font_height >= h) // reached bottom of screen -+ break; -+ else{ -+ paint_bg((unsigned short *)fb, W, cur_line, font_height+y_padding_lines, bg_color); -+ screen = (unsigned short *)fb + x + cur_line * w; -+ screen_line_start = screen; -+ } -+ } -+ -+ if (c == ' ' || c == '\n' || (c == '^')) -+ continue; -+ -+ for (l = 0; l < font_height; l++) -+ { -+ unsigned char fd = fontdata8x8[c * font_width + l]; -+ unsigned short *s = screen + l * w; -+ -+ if (fd&0x80) s[0] = val; -+ if (fd&0x40) s[1] = val; -+ if (fd&0x20) s[2] = val; -+ if (fd&0x10) s[3] = val; -+ if (fd&0x08) s[4] = val; -+ if (fd&0x04) s[5] = val; -+ if (fd&0x02) s[6] = val; -+ if (fd&0x01) s[7] = val; -+ -+#if 0 -+ // draw "shadow" (RGB1555 compatible) -+ unsigned char fd1, fdp = 0; -+ if (l > 0) -+ fdp = fontdata8x8[c * font_width + l - 1]; -+ -+ for (fd1 = 0x80; fd1 != 0; fd1 >>= 1, s++) -+ if (!(fd & (fd1 >> 1)) && ((fdp | fd) & fd1)) -+ s[1] = (s[1] >> 1) & 0x39ef; -+#endif -+ } -+ } -+} -+ -+/* note: may use 1 extra pixel on the right */ -+void basic_text_out16_nf(void *fb, int w, int h, int x, int y, -+ unsigned short fg_color, const char *text) -+{ -+ int i, l; -+ int cur_line = 0; -+ unsigned short *screen; -+ unsigned short *screen_line_start; -+ unsigned short val = fg_color; -+ unsigned short font_width = 8; -+ unsigned short font_height = 8; -+ unsigned short y_padding_lines = 6; -+ -+ /* Draw chars */ -+ cur_line = y+y_padding_lines; -+ //printk("New line, y=%d\n", cur_line); -+ screen = (unsigned short *)fb + x + cur_line * w; -+ screen_line_start = screen; -+ for (i = 0; ; i++, screen += font_width) -+ { -+ char c = text[i]; -+ //printk("c=%c,0x%02X,%d\n", c, c, c); -+ -+ if (c == 0) -+ break; -+ -+ if(screen >= screen_line_start + w || (c == '\n') || (c == '^')){ -+ cur_line += (font_height + y_padding_lines); -+ //printk("New line, y=%d\n", cur_line); -+ if(cur_line+font_height >= h) // reached bottom of screen -+ break; -+ else{ -+ screen = (unsigned short *)fb + x + cur_line * w; -+ screen_line_start = screen; -+ } -+ } -+ -+ if (c == ' ' || c == '\n' || (c == '^')) -+ continue; -+ -+ for (l = 0; l < font_height; l++) -+ { -+ unsigned char fd = fontdata8x8[c * font_width + l]; -+ unsigned short *s = screen + l * w; -+ unsigned char fd1, fdp = 0; -+ -+ if (fd&0x80) s[0] = val; -+ if (fd&0x40) s[1] = val; -+ if (fd&0x20) s[2] = val; -+ if (fd&0x10) s[3] = val; -+ if (fd&0x08) s[4] = val; -+ if (fd&0x04) s[5] = val; -+ if (fd&0x02) s[6] = val; -+ if (fd&0x01) s[7] = val; -+ -+ // draw "shadow" (RGB1555 compatible) -+ if (l > 0) -+ fdp = fontdata8x8[c * font_width + l - 1]; -+ -+ for (fd1 = 0x80; fd1 != 0; fd1 >>= 1, s++) -+ if (!(fd & (fd1 >> 1)) && ((fdp | fd) & fd1)) -+ s[1] = (s[1] >> 1) & 0x39ef; -+ } -+ } -+} -+ -+void basic_text_out_uyvy_nf(void *fb, int w, int x, int y, const char *text) -+{ -+ int i, l; -+ unsigned short *screen; -+ -+ screen = (unsigned short *)fb + x + y * w; -+ for (i = 0; ; i++, screen += 8) -+ { -+ char c = text[i]; -+ if (c == 0) -+ break; -+ if (c == ' ') -+ continue; -+ -+ for (l = 0; l < 8; l++) -+ { -+ unsigned char fd = fontdata8x8[c * 8 + l]; -+ unsigned char *s = (void *)(screen + l * w); -+ unsigned char fd1, fdp = 0; -+ -+ if (fd&0x80) s[0 * 2 + 1] = 235; -+ if (fd&0x40) s[1 * 2 + 1] = 235; -+ if (fd&0x20) s[2 * 2 + 1] = 235; -+ if (fd&0x10) s[3 * 2 + 1] = 235; -+ if (fd&0x08) s[4 * 2 + 1] = 235; -+ if (fd&0x04) s[5 * 2 + 1] = 235; -+ if (fd&0x02) s[6 * 2 + 1] = 235; -+ if (fd&0x01) s[7 * 2 + 1] = 235; -+ -+ // draw "shadow" -+ if (l > 0) -+ fdp = fontdata8x8[c * 8 + l - 1]; -+ -+ for (fd1 = 0x80; fd1 != 0; fd1 >>= 1, s += 2) -+ if (!(fd & (fd1 >> 1)) && ((fdp | fd) & fd1)) -+ s[1] /= 2; -+ } -+ } -+} -+ -+void basic_text_out16(void *fb, int w, int h, int x, int y, -+ unsigned short fg_color, const char *texto, ...) -+{ -+ va_list args; -+ char buffer[256]; -+ -+ va_start(args, texto); -+ vsnprintf(buffer, sizeof(buffer), texto, args); -+ va_end(args); -+ -+ basic_text_out16_nf(fb, w, h, x, y, fg_color, buffer); -+} -+ -+ -+void DrawText(u16 *framebuffer, int framebufferWidth, int framebufferStrideBytes, int framebufferHeight, const char *text, int x, int y, u16 color, u16 bgColor) -+{ -+ int W = framebufferWidth; -+ int H = framebufferHeight; -+ int Y = y; -+ int X = x; -+ int cur_x; -+ int endX = x + MONACO_WIDTH; -+ int yEnd = Y + MONACO_HEIGHT - 1; -+ int i; -+ u8 *byte; -+ u8 bit; -+ -+ framebufferStrideBytes >>= 1; // to uint16 elements -+ while(*text) -+ { -+ u8 ch = (u8)*text; -+ -+ if (ch < 32 || ch >= 127) { -+ ch = 0; -+ return; -+ } -+ else ch -= 32; -+ -+ X = x; -+ endX = x + MONACO_WIDTH; -+ -+ for(y = Y-1; y < Y + monaco_height_adjust[ch]; ++y) -+ for( cur_x = X; cur_x < endX+1; ++cur_x) -+ if (cur_x >= 0 && y >= 0 && cur_x < W && y < H) -+ { -+ framebuffer[AT(cur_x,y)] = bgColor; -+ } -+ -+ y = Y + monaco_height_adjust[ch]; -+ yEnd = Y + MONACO_HEIGHT - 1; -+ -+ byte = monaco_font + ch*MONACO_BYTES_PER_CHAR; -+ for( i = 0; i < MONACO_BYTES_PER_CHAR; ++i, ++byte) -+ { -+ for( bit = 1; bit; bit <<= 1) -+ { -+ if (x >= 0 && y >= 0 && x < W && y < H) -+ { -+ if ((*byte & bit)) framebuffer[AT(x,y)] = color; -+ else framebuffer[AT(x,y)] = bgColor; -+ } -+ ++x; -+ if (x == endX) -+ { -+ if (y < H) framebuffer[AT(x,y)] = bgColor; -+ x = X; -+ ++y; -+ if (y == yEnd) -+ { -+ i = MONACO_BYTES_PER_CHAR; -+ bit = 0; -+ break; -+ } -+ } -+ } -+ } -+ ++text; -+ x += 6; -+ } -+} ++#include "fb_text.h" ++ ++#define AT(x, y) (y)*W+(x) ++#define MIN(a,b) (((a)<(b))?(a):(b)) ++#define MAX(a,b) (((a)>(b))?(a):(b)) ++ ++ ++ ++static u8 monaco_font[] = { ++ ++/* ++..... ++..... ++..... ++..... ++..... ++..... ++..... ++..... ++ */ 0x00,0x00,0x00,0x00,0x00, ++ ++/* ++#.... ++#.... ++#.... ++#.... ++#.... ++..... ++#.... ++..... ++ !*/ 0x21,0x84,0x10,0x40,0x00, ++ ++/* ++#.#.. ++#.#.. ++..... ++..... ++..... ++..... ++..... ++..... ++ "*/ 0xa5,0x00,0x00,0x00,0x00, ++ ++/* ++..##. ++..##. ++##### ++.#.#. ++##### ++.##.. ++.##.. ++..... ++ #*/ 0x8c,0x7d,0xf5,0x8d,0x01, ++ ++/* ++..#.. ++.#### ++#.#.. ++#.#.. ++.##.. ++..### ++..#.# ++####. ++ $*/ 0xc4,0x97,0x62,0x38,0x7d, ++ ++/* ++#...# ++##..# ++#..#. ++..#.. ++..##. ++.#.## ++#..#. ++..... ++ %*/ 0x71,0x26,0xc2,0x74,0x02, ++ ++/* ++.#... ++#.#.. ++#.#.. ++.#... ++#.##. ++#..#. ++.###. ++..... ++ &*/ 0xa2,0x14,0xd1,0x92,0x03, ++ ++/* ++#.... ++#.... ++..... ++..... ++..... ++..... ++..... ++..... ++ '*/ 0x21,0x00,0x00,0x00,0x00, ++ ++/* ++..#.. ++.#... ++#.... ++#.... ++#.... ++#.... ++.#... ++..#.. ++ (*/ 0x44,0x84,0x10,0x82,0x20, ++ ++/* ++#.... ++.#... ++..#.. ++..#.. ++..#.. ++..#.. ++.#... ++#.... ++ )*/ 0x41,0x10,0x42,0x88,0x08, ++ ++/* ++.#... ++###.. ++###.. ++.#... ++..... ++..... ++..... ++..... ++ **/ 0xe2,0x1c,0x01,0x00,0x00, ++ ++/* ++..#.. ++..#.. ++##### ++..#.. ++..#.. ++..... ++..... ++..... ++ +*/ 0x84,0x7c,0x42,0x00,0x00, ++ ++/* ++#.... ++#.... ++#.... ++..... ++..... ++..... ++..... ++..... ++ ,*/ 0x21,0x04,0x00,0x00,0x00, ++ ++/* ++###.. ++..... ++..... ++..... ++..... ++..... ++..... ++..... ++ -*/ 0x07,0x00,0x00,0x00,0x00, ++ ++/* ++#.... ++..... ++..... ++..... ++..... ++..... ++..... ++..... ++ .*/ 0x01,0x00,0x00,0x00,0x00, ++ ++/* ++...#. ++...#. ++..#.. ++.#... ++.#... ++#.... ++..... ++..... ++ /*/ 0x08,0x11,0x21,0x02,0x00, ++ ++/* ++.##.. ++#.##. ++#.##. ++##.#. ++##.#. ++##.#. ++.##.. ++..... ++ 0*/ 0xa6,0xb5,0xb5,0x96,0x01, ++ ++/* ++.#... ++##... ++.#... ++.#... ++.#... ++.#... ++###.. ++..... ++ 1*/ 0x62,0x08,0x21,0xc4,0x01, ++ ++/* ++###.. ++...#. ++...#. ++..#.. ++.#... ++#.... ++####. ++..... ++ 2*/ 0x07,0x21,0x22,0xc2,0x03, ++ ++/* ++###.. ++...#. ++...#. ++.##.. ++...#. ++...#. ++###.. ++..... ++ 3*/ 0x07,0x21,0x83,0xd0,0x01, ++ ++/* ++...#. ++..##. ++.#.#. ++#..#. ++##### ++...#. ++...#. ++..... ++ 4*/ 0x88,0xa9,0xf4,0x11,0x02, ++ ++/* ++####. ++#.... ++###.. ++...#. ++...#. ++...#. ++###.. ++..... ++ 5*/ 0x2f,0x1c,0x84,0xd0,0x01, ++ ++/* ++.##.. ++#.... ++#.#.. ++##.#. ++##.#. ++##.#. ++.##.. ++..... ++ 6*/ 0x26,0x94,0xb5,0x96,0x01, ++ ++/* ++####. ++...#. ++...#. ++..#.. ++.##.. ++.#... ++.#... ++..... ++ 7*/ 0x0f,0x21,0x62,0x84,0x00, ++ ++/* ++.###. ++#..#. ++#..#. ++.##.. ++#..#. ++#..#. ++###.. ++..... ++ 8*/ 0x2e,0x25,0x93,0xd2,0x01, ++ ++/* ++.##.. ++#..#. ++#..#. ++#..#. ++.###. ++...#. ++.##.. ++..... ++ 9*/ 0x26,0xa5,0xe4,0x90,0x01, ++ ++/* ++#.... ++..... ++..... ++..... ++#.... ++..... ++..... ++..... ++ :*/ 0x01,0x00,0x10,0x00,0x00, ++ ++/* ++#.... ++..... ++..... ++..... ++#.... ++#.... ++#.... ++..... ++ ;*/ 0x01,0x00,0x10,0x42,0x00, ++ ++/* ++....# ++..##. ++##... ++..##. ++....# ++..... ++..... ++..... ++ <*/ 0x90,0x0d,0x06,0x01,0x00, ++ ++/* ++####. ++..... ++####. ++..... ++..... ++..... ++..... ++..... ++ =*/ 0x0f,0x3c,0x00,0x00,0x00, ++ ++/* ++#.... ++.##.. ++...## ++.##.. ++#.... ++..... ++..... ++..... ++ >*/ 0xc1,0x60,0x13,0x00,0x00, ++ ++/* ++###.. ++..#.. ++..#.. ++.#... ++.#... ++..... ++.#... ++..... ++ ?*/ 0x87,0x10,0x21,0x80,0x00, ++ ++/* ++.###. ++#...# ++#.### ++##.## ++##.## ++#.##. ++.##.. ++..... ++ @*/ 0x2e,0xf6,0xbd,0x9b,0x01, ++ ++/* ++.##.. ++.##.. ++.##.. ++.##.. ++####. ++####. ++#..#. ++..... ++ A*/ 0xc6,0x18,0xf3,0x5e,0x02, ++ ++/* ++##... ++#.#.. ++#.#.. ++##... ++#.#.. ++#.#.. ++##... ++..... ++ B*/ 0xa3,0x94,0x51,0xca,0x00, ++ ++/* ++.###. ++#.... ++#.... ++#.... ++#.... ++#.... ++.###. ++..... ++ C*/ 0x2e,0x84,0x10,0x82,0x03, ++ ++/* ++###.. ++#..#. ++#..#. ++#..#. ++#..#. ++#..#. ++###.. ++..... ++ D*/ 0x27,0xa5,0x94,0xd2,0x01, ++ ++/* ++####. ++#.... ++#.... ++####. ++#.... ++#.... ++####. ++..... ++ E*/ 0x2f,0x84,0x17,0xc2,0x03, ++ ++/* ++####. ++#.... ++#.... ++####. ++#.... ++#.... ++#.... ++..... ++ F*/ 0x2f,0x84,0x17,0x42,0x00, ++ ++/* ++.###. ++#.... ++#.... ++#.##. ++#..#. ++#..#. ++.###. ++..... ++ G*/ 0x2e,0x84,0x96,0x92,0x03, ++ ++/* ++#..#. ++#..#. ++#..#. ++####. ++#..#. ++#..#. ++#..#. ++..... ++ H*/ 0x29,0xa5,0x97,0x52,0x02, ++ ++/* ++###.. ++.#... ++.#... ++.#... ++.#... ++.#... ++###.. ++..... ++ I*/ 0x47,0x08,0x21,0xc4,0x01, ++ ++/* ++.###. ++...#. ++...#. ++...#. ++...#. ++...#. ++###.. ++..... ++ J*/ 0x0e,0x21,0x84,0xd0,0x01, ++ ++/* ++#..#. ++#..#. ++#.#.. ++##... ++#.#.. ++#.#.. ++#..#. ++..... ++ K*/ 0x29,0x95,0x51,0x4a,0x02, ++ ++/* ++#.... ++#.... ++#.... ++#.... ++#.... ++#.... ++###.. ++..... ++ L*/ 0x21,0x84,0x10,0xc2,0x01, ++ ++/* ++##.## ++##.## ++##.## ++##.## ++###.# ++#.#.# ++#...# ++..... ++ M*/ 0x7b,0xef,0x7d,0x6b,0x04, ++ ++/* ++#..#. ++##.#. ++##.#. ++#.##. ++#.##. ++#.##. ++#..#. ++..... ++ N*/ 0x69,0xad,0xd6,0x5a,0x02, ++ ++/* ++.##.. ++#..#. ++#..#. ++#..#. ++#..#. ++#..#. ++.##.. ++..... ++ O*/ 0x26,0xa5,0x94,0x92,0x01, ++ ++/* ++###.. ++#..#. ++#..#. ++#..#. ++###.. ++#.... ++#.... ++..... ++ P*/ 0x27,0xa5,0x74,0x42,0x00, ++ ++/* ++.##.. ++#..#. ++#..#. ++#..#. ++#..#. ++#..#. ++.##.. ++..#.. ++ Q*/ 0x26,0xa5,0x94,0x92,0x21, ++ ++/* ++##... ++#.#.. ++#.#.. ++##... ++##... ++#.#.. ++#.#.. ++..... ++ R*/ 0xa3,0x94,0x31,0x4a,0x01, ++ ++/* ++###.. ++#.... ++#.... ++.#... ++..#.. ++..#.. ++###.. ++..... ++ S*/ 0x27,0x04,0x41,0xc8,0x01, ++ ++/* ++##### ++..#.. ++..#.. ++..#.. ++..#.. ++..#.. ++..#.. ++..... ++ T*/ 0x9f,0x10,0x42,0x08,0x01, ++ ++/* ++#..#. ++#..#. ++#..#. ++#..#. ++#..#. ++#..#. ++.##.. ++..... ++ U*/ 0x29,0xa5,0x94,0x92,0x01, ++ ++/* ++#.#.. ++#.#.. ++#.#.. ++#.#.. ++#.#.. ++.#... ++.#... ++..... ++ V*/ 0xa5,0x94,0x52,0x84,0x00, ++ ++/* ++#.#.# ++#.#.# ++###.# ++##.## ++.#.#. ++.#.#. ++.#.#. ++..... ++ W*/ 0xb5,0xde,0xad,0x94,0x02, ++ ++/* ++.#.#. ++.#.#. ++..#.. ++..#.. ++..#.. ++.#.#. ++.#.#. ++..... ++ X*/ 0x4a,0x11,0x42,0x94,0x02, ++ ++/* ++#.#.. ++#.#.. ++#.#.. ++.#... ++.#... ++.#... ++.#... ++..... ++ Y*/ 0xa5,0x14,0x21,0x84,0x00, ++ ++/* ++####. ++...#. ++..#.. ++.#... ++.#... ++#.... ++####. ++..... ++ Z*/ 0x0f,0x11,0x21,0xc2,0x03, ++ ++/* ++###.. ++#.... ++#.... ++#.... ++#.... ++#.... ++#.... ++###.. ++ [*/ 0x27,0x84,0x10,0x42,0x38, ++ ++/* ++#.... ++#.... ++.#... ++.#... ++..#.. ++...#. ++..... ++..... ++ \*/ 0x21,0x08,0x41,0x10,0x00, ++ ++/* ++###.. ++..#.. ++..#.. ++..#.. ++..#.. ++..#.. ++..#.. ++###.. ++ ]*/ 0x87,0x10,0x42,0x08,0x39, ++ ++/* ++.#... ++.##.. ++.##.. ++#..#. ++..... ++..... ++..... ++..... ++ ^*/ 0xc2,0x98,0x04,0x00,0x00, ++ ++/* ++####. ++..... ++..... ++..... ++..... ++..... ++..... ++..... ++ _*/ 0x0f,0x00,0x00,0x00,0x00, ++ ++/* ++.#... ++..... ++..... ++..... ++..... ++..... ++..... ++..... ++ `*/ 0x02,0x00,0x00,0x00,0x00, ++ ++/* ++.#### ++#...# ++#...# ++#...# ++.#### ++..... ++..... ++..... ++ a*/ 0x3e,0xc6,0xe8,0x01,0x00, ++ ++/* ++#.... ++#.... ++####. ++#...# ++#...# ++#...# ++####. ++..... ++ b*/ 0x21,0xbc,0x18,0xe3,0x03, ++ ++/* ++.###. ++#.... ++#.... ++#.... ++.###. ++..... ++..... ++..... ++ c*/ 0x2e,0x84,0xe0,0x00,0x00, ++ ++/* ++...#. ++...#. ++.###. ++#..#. ++#..#. ++#..#. ++.###. ++..... ++ d*/ 0x08,0xb9,0x94,0x92,0x03, ++ ++/* ++.##.. ++#..#. ++####. ++#.... ++.###. ++..... ++..... ++..... ++ e*/ 0x26,0xbd,0xe0,0x00,0x00, ++ ++/* ++..### ++.#... ++####. ++.#... ++.#... ++.#... ++.#... ++..... ++ f*/ 0x5c,0x3c,0x21,0x84,0x00, ++ ++/* ++.###. ++#..#. ++#..#. ++#..#. ++.###. ++...#. ++###.. ++..... ++ g*/ 0x2e,0xa5,0xe4,0xd0,0x01, ++ ++/* ++#.... ++#.... ++###.. ++#..#. ++#..#. ++#..#. ++#..#. ++..... ++ h*/ 0x21,0x9c,0x94,0x52,0x02, ++ ++/* ++.#... ++..... ++##... ++.#... ++.#... ++.#... ++.##.. ++..... ++ i*/ 0x02,0x0c,0x21,0x84,0x01, ++ ++/* ++..#.. ++..... ++###.. ++..#.. ++..#.. ++..#.. ++..#.. ++..#.. ++ j*/ 0x04,0x1c,0x42,0x08,0x21, ++ ++/* ++#.... ++#.... ++#.#.. ++##... ++##... ++#.#.. ++#..#. ++..... ++ k*/ 0x21,0x94,0x31,0x4a,0x02, ++ ++/* ++##... ++.#... ++.#... ++.#... ++.#... ++.#... ++.##.. ++..... ++ l*/ 0x43,0x08,0x21,0x84,0x01, ++ ++/* ++##### ++#.#.# ++#.#.# ++#.#.# ++#.#.# ++..... ++..... ++..... ++ m*/ 0xbf,0xd6,0x5a,0x01,0x00, ++ ++/* ++###.. ++#..#. ++#..#. ++#..#. ++#..#. ++..... ++..... ++..... ++ n*/ 0x27,0xa5,0x94,0x00,0x00, ++ ++/* ++.##.. ++#..#. ++#..#. ++#..#. ++.##.. ++..... ++..... ++..... ++ o*/ 0x26,0xa5,0x64,0x00,0x00, ++ ++/* ++####. ++#...# ++#...# ++#...# ++####. ++#.... ++#.... ++..... ++ p*/ 0x2f,0xc6,0xf8,0x42,0x00, ++ ++/* ++.###. ++#..#. ++#..#. ++#..#. ++.###. ++...#. ++...#. ++..... ++ q*/ 0x2e,0xa5,0xe4,0x10,0x02, ++ ++/* ++###.. ++#.#.. ++#.... ++#.... ++#.... ++..... ++..... ++..... ++ r*/ 0xa7,0x84,0x10,0x00,0x00, ++ ++/* ++.###. ++#..#. ++.###. ++#..#. ++###.. ++..... ++..... ++..... ++ s*/ 0x2e,0xb9,0x74,0x00,0x00, ++ ++/* ++.#... ++.#... ++####. ++.#... ++.#... ++..##. ++..... ++..... ++ t*/ 0x42,0x3c,0x21,0x18,0x00, ++ ++/* ++#..#. ++#..#. ++#..#. ++#..#. ++.###. ++..... ++..... ++..... ++ u*/ 0x29,0xa5,0xe4,0x00,0x00, ++ ++/* ++#.#.. ++#.#.. ++#.#.. ++###.. ++.#... ++..... ++..... ++..... ++ v*/ 0xa5,0x94,0x23,0x00,0x00, ++ ++/* ++#.#.# ++###.# ++###.# ++####. ++.#.#. ++..... ++..... ++..... ++ w*/ 0xf5,0xde,0xa7,0x00,0x00, ++ ++/* ++.#.#. ++.##.. ++..#.. ++.#.#. ++.#.#. ++..... ++..... ++..... ++ x*/ 0xca,0x10,0xa5,0x00,0x00, ++ ++/* ++.#.#. ++.#.#. ++.#.#. ++..##. ++..#.. ++..#.. ++##... ++..... ++ y*/ 0x4a,0x29,0x46,0xc8,0x00, ++ ++/* ++####. ++..#.. ++.#... ++#.... ++####. ++..... ++..... ++..... ++ z*/ 0x8f,0x88,0xf0,0x00,0x00, ++ ++/* ++.##.. ++.#... ++.#... ++.#... ++#.... ++.#... ++.#... ++.##.. ++ {*/ 0x46,0x08,0x11,0x84,0x30, ++ ++/* ++#.... ++#.... ++#.... ++#.... ++#.... ++#.... ++..... ++..... ++ |*/ 0x21,0x84,0x10,0x02,0x00, ++ ++/* ++##... ++.#... ++.#... ++.#... ++..#.. ++.#... ++.#... ++##... ++ }*/ 0x43,0x08,0x41,0x84,0x18, ++ ++/* ++##### ++..... ++..... ++..... ++..... ++..... ++..... ++..... ++ ~*/ 0x1f,0x00,0x00,0x00,0x00, ++ ++}; ++ ++//static u8 monaco_font_outline[127*MONACO_BYTES_PER_CHAR] = {}; ++ ++static const s8 monaco_height_adjust[] = { ++ 6,-1,-1,-1,-2,-1,-1,-1,-1,-1,-1,1,5,3,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,2,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6,0,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,-1,-1,-1,4, ++}; ++ ++unsigned char fontdata8x8[64*16] = ++{ ++ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ++ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ++ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ++ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ++ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, ++ 0x3C,0x42,0x99,0xBD,0xBD,0x99,0x42,0x3C,0x3C,0x42,0x81,0x81,0x81,0x81,0x42,0x3C, ++ 0xFE,0x82,0x8A,0xD2,0xA2,0x82,0xFE,0x00,0xFE,0x82,0x82,0x82,0x82,0x82,0xFE,0x00, ++ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x64,0x74,0x7C,0x38,0x00,0x00, ++ 0x80,0xC0,0xF0,0xFC,0xF0,0xC0,0x80,0x00,0x01,0x03,0x0F,0x3F,0x0F,0x03,0x01,0x00, ++ 0x18,0x3C,0x7E,0x18,0x7E,0x3C,0x18,0x00,0xEE,0xEE,0xEE,0xCC,0x00,0xCC,0xCC,0x00, ++ 0x00,0x00,0x30,0x68,0x78,0x30,0x00,0x00,0x00,0x38,0x64,0x74,0x7C,0x38,0x00,0x00, ++ 0x3C,0x66,0x7A,0x7A,0x7E,0x7E,0x3C,0x00,0x0E,0x3E,0x3A,0x22,0x26,0x6E,0xE4,0x40, ++ 0x18,0x3C,0x7E,0x3C,0x3C,0x3C,0x3C,0x00,0x3C,0x3C,0x3C,0x3C,0x7E,0x3C,0x18,0x00, ++ 0x08,0x7C,0x7E,0x7E,0x7C,0x08,0x00,0x00,0x10,0x3E,0x7E,0x7E,0x3E,0x10,0x00,0x00, ++ 0x58,0x2A,0xDC,0xC8,0xDC,0x2A,0x58,0x00,0x24,0x66,0xFF,0xFF,0x66,0x24,0x00,0x00, ++ 0x00,0x10,0x10,0x38,0x38,0x7C,0xFE,0x00,0xFE,0x7C,0x38,0x38,0x10,0x10,0x00,0x00, ++ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x1C,0x1C,0x18,0x00,0x18,0x18,0x00, ++ 0x6C,0x6C,0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x7C,0x28,0x7C,0x28,0x00,0x00, ++ 0x10,0x38,0x60,0x38,0x0C,0x78,0x10,0x00,0x40,0xA4,0x48,0x10,0x24,0x4A,0x04,0x00, ++ 0x18,0x34,0x18,0x3A,0x6C,0x66,0x3A,0x00,0x18,0x18,0x20,0x00,0x00,0x00,0x00,0x00, ++ 0x30,0x60,0x60,0x60,0x60,0x60,0x30,0x00,0x0C,0x06,0x06,0x06,0x06,0x06,0x0C,0x00, ++ 0x10,0x54,0x38,0x7C,0x38,0x54,0x10,0x00,0x00,0x18,0x18,0x7E,0x18,0x18,0x00,0x00, ++ 0x00,0x00,0x00,0x00,0x18,0x18,0x30,0x00,0x00,0x00,0x00,0x00,0x3E,0x00,0x00,0x00, ++ 0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x04,0x08,0x10,0x20,0x40,0x00,0x00, ++ 0x38,0x4C,0xC6,0xC6,0xC6,0x64,0x38,0x00,0x18,0x38,0x18,0x18,0x18,0x18,0x7E,0x00, ++ 0x7C,0xC6,0x0E,0x3C,0x78,0xE0,0xFE,0x00,0x7E,0x0C,0x18,0x3C,0x06,0xC6,0x7C,0x00, ++ 0x1C,0x3C,0x6C,0xCC,0xFE,0x0C,0x0C,0x00,0xFC,0xC0,0xFC,0x06,0x06,0xC6,0x7C,0x00, ++ 0x3C,0x60,0xC0,0xFC,0xC6,0xC6,0x7C,0x00,0xFE,0xC6,0x0C,0x18,0x30,0x30,0x30,0x00, ++ 0x78,0xC4,0xE4,0x78,0x86,0x86,0x7C,0x00,0x7C,0xC6,0xC6,0x7E,0x06,0x0C,0x78,0x00, ++ 0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x18,0x18,0x30, ++ 0x1C,0x38,0x70,0xE0,0x70,0x38,0x1C,0x00,0x00,0x7C,0x00,0x00,0x7C,0x00,0x00,0x00, ++ 0x70,0x38,0x1C,0x0E,0x1C,0x38,0x70,0x00,0x7C,0xC6,0xC6,0x1C,0x18,0x00,0x18,0x00, ++ 0x3C,0x42,0x99,0xA1,0xA5,0x99,0x42,0x3C,0x38,0x6C,0xC6,0xC6,0xFE,0xC6,0xC6,0x00, ++ 0xFC,0xC6,0xC6,0xFC,0xC6,0xC6,0xFC,0x00,0x3C,0x66,0xC0,0xC0,0xC0,0x66,0x3C,0x00, ++ 0xF8,0xCC,0xC6,0xC6,0xC6,0xCC,0xF8,0x00,0xFE,0xC0,0xC0,0xFC,0xC0,0xC0,0xFE,0x00, ++ 0xFE,0xC0,0xC0,0xFC,0xC0,0xC0,0xC0,0x00,0x3E,0x60,0xC0,0xCE,0xC6,0x66,0x3E,0x00, ++ 0xC6,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0x00,0x7E,0x18,0x18,0x18,0x18,0x18,0x7E,0x00, ++ 0x06,0x06,0x06,0x06,0xC6,0xC6,0x7C,0x00,0xC6,0xCC,0xD8,0xF0,0xF8,0xDC,0xCE,0x00, ++ 0x60,0x60,0x60,0x60,0x60,0x60,0x7E,0x00,0xC6,0xEE,0xFE,0xFE,0xD6,0xC6,0xC6,0x00, ++ 0xC6,0xE6,0xF6,0xFE,0xDE,0xCE,0xC6,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00, ++ 0xFC,0xC6,0xC6,0xC6,0xFC,0xC0,0xC0,0x00,0x7C,0xC6,0xC6,0xC6,0xDE,0xCC,0x7A,0x00, ++ 0xFC,0xC6,0xC6,0xCE,0xF8,0xDC,0xCE,0x00,0x78,0xCC,0xC0,0x7C,0x06,0xC6,0x7C,0x00, ++ 0x7E,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00, ++ 0xC6,0xC6,0xC6,0xEE,0x7C,0x38,0x10,0x00,0xC6,0xC6,0xD6,0xFE,0xFE,0xEE,0xC6,0x00, ++ 0xC6,0xEE,0x3C,0x38,0x7C,0xEE,0xC6,0x00,0x66,0x66,0x66,0x3C,0x18,0x18,0x18,0x00, ++ 0xFE,0x0E,0x1C,0x38,0x70,0xE0,0xFE,0x00,0x3C,0x30,0x30,0x30,0x30,0x30,0x3C,0x00, ++ 0x60,0x60,0x30,0x18,0x0C,0x06,0x06,0x00,0x3C,0x0C,0x0C,0x0C,0x0C,0x0C,0x3C,0x00, ++ 0x18,0x3C,0x66,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF, ++ 0x30,0x30,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x06,0x3E,0x66,0x66,0x3C,0x00, ++ 0x60,0x7C,0x66,0x66,0x66,0x66,0x7C,0x00,0x00,0x3C,0x66,0x60,0x60,0x66,0x3C,0x00, ++ 0x06,0x3E,0x66,0x66,0x66,0x66,0x3E,0x00,0x00,0x3C,0x66,0x66,0x7E,0x60,0x3C,0x00, ++ 0x1C,0x30,0x78,0x30,0x30,0x30,0x30,0x00,0x00,0x3E,0x66,0x66,0x66,0x3E,0x06,0x3C, ++ 0x60,0x7C,0x76,0x66,0x66,0x66,0x66,0x00,0x18,0x00,0x38,0x18,0x18,0x18,0x18,0x00, ++ 0x0C,0x00,0x1C,0x0C,0x0C,0x0C,0x0C,0x38,0x60,0x60,0x66,0x6C,0x78,0x6C,0x66,0x00, ++ 0x38,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0xEC,0xFE,0xFE,0xFE,0xD6,0xC6,0x00, ++ 0x00,0x7C,0x76,0x66,0x66,0x66,0x66,0x00,0x00,0x3C,0x66,0x66,0x66,0x66,0x3C,0x00, ++ 0x00,0x7C,0x66,0x66,0x66,0x7C,0x60,0x60,0x00,0x3E,0x66,0x66,0x66,0x3E,0x06,0x06, ++ 0x00,0x7E,0x70,0x60,0x60,0x60,0x60,0x00,0x00,0x3C,0x60,0x3C,0x06,0x66,0x3C,0x00, ++ 0x30,0x78,0x30,0x30,0x30,0x30,0x1C,0x00,0x00,0x66,0x66,0x66,0x66,0x6E,0x3E,0x00, ++ 0x00,0x66,0x66,0x66,0x66,0x3C,0x18,0x00,0x00,0xC6,0xD6,0xFE,0xFE,0x7C,0x6C,0x00, ++ 0x00,0x66,0x3C,0x18,0x3C,0x66,0x66,0x00,0x00,0x66,0x66,0x66,0x66,0x3E,0x06,0x3C, ++ 0x00,0x7E,0x0C,0x18,0x30,0x60,0x7E,0x00,0x0E,0x18,0x0C,0x38,0x0C,0x18,0x0E,0x00, ++ 0x18,0x18,0x18,0x00,0x18,0x18,0x18,0x00,0x70,0x18,0x30,0x1C,0x30,0x18,0x70,0x00, ++ 0x00,0x00,0x76,0xDC,0x00,0x00,0x00,0x00,0x10,0x28,0x10,0x54,0xAA,0x44,0x00,0x00, ++}; ++ ++ ++/* The font is generated from Xorg clR5x8.bdf */ ++/* ++COMMENT Copyright 1989 Dale Schumacher, dal@syntel.mn.org ++COMMENT 399 Beacon Ave. ++COMMENT St. Paul, MN 55104-3527 ++COMMENT ++COMMENT Permission to use, copy, modify, and distribute this software and ++COMMENT its documentation for any purpose and without fee is hereby ++COMMENT granted, provided that the above copyright notice appear in all ++COMMENT copies and that both that copyright notice and this permission ++COMMENT notice appear in supporting documentation, and that the name of ++COMMENT Dale Schumacher not be used in advertising or publicity pertaining to ++COMMENT distribution of the software without specific, written prior ++COMMENT permission. Dale Schumacher makes no representations about the ++COMMENT suitability of this software for any purpose. It is provided "as ++COMMENT is" without express or implied warranty. ++COMMENT ++*/ ++unsigned char fontdata6x8[256][8] = { ++{ 0x7c>>2, 0x44>>2, 0x7c>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0xff>>2, 0x7c>>2, }, ++{ 0x00>>2, 0x00>>2, 0x10>>2, 0x28>>2, 0x44>>2, 0x7c>>2, 0x44>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x78>>2, 0x44>>2, 0x78>>2, 0x44>>2, 0x78>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x38>>2, 0x44>>2, 0x40>>2, 0x44>>2, 0x38>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x78>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x78>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x7c>>2, 0x40>>2, 0x78>>2, 0x40>>2, 0x7c>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x7c>>2, 0x40>>2, 0x78>>2, 0x40>>2, 0x40>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x3c>>2, 0x40>>2, 0x4c>>2, 0x44>>2, 0x3c>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x44>>2, 0x44>>2, 0x7c>>2, 0x44>>2, 0x44>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x38>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x38>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x1c>>2, 0x04>>2, 0x04>>2, 0x44>>2, 0x38>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x48>>2, 0x50>>2, 0x60>>2, 0x50>>2, 0x48>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x40>>2, 0x40>>2, 0x40>>2, 0x40>>2, 0x7c>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x44>>2, 0x6c>>2, 0x54>>2, 0x54>>2, 0x44>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x44>>2, 0x64>>2, 0x54>>2, 0x4c>>2, 0x44>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x38>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x38>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x78>>2, 0x44>>2, 0x78>>2, 0x40>>2, 0x40>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x38>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x38>>2, 0x0c>>2, }, ++{ 0x00>>2, 0x00>>2, 0x78>>2, 0x44>>2, 0x78>>2, 0x50>>2, 0x4c>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x3c>>2, 0x40>>2, 0x38>>2, 0x04>>2, 0x78>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x7c>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x38>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x44>>2, 0x44>>2, 0x28>>2, 0x28>>2, 0x10>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x44>>2, 0x54>>2, 0x54>>2, 0x6c>>2, 0x44>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x44>>2, 0x28>>2, 0x10>>2, 0x28>>2, 0x44>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x44>>2, 0x28>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x7c>>2, 0x08>>2, 0x10>>2, 0x20>>2, 0x7c>>2, 0x00>>2, }, ++{ 0xe0>>2, 0x80>>2, 0xe0>>2, 0x8c>>2, 0xf0>>2, 0x10>>2, 0x10>>2, 0x0c>>2, }, ++{ 0x00>>2, 0x10>>2, 0x38>>2, 0x7c>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x00>>2, }, ++{ 0x00>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x7c>>2, 0x38>>2, 0x10>>2, 0x00>>2, }, ++{ 0x00>>2, 0x10>>2, 0x18>>2, 0xfc>>2, 0x18>>2, 0x10>>2, 0x00>>2, 0x00>>2, }, ++{ 0x00>>2, 0x20>>2, 0x60>>2, 0xfc>>2, 0x60>>2, 0x20>>2, 0x00>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, }, ++{ 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x00>>2, 0x10>>2, 0x00>>2, }, ++{ 0x28>>2, 0x28>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, }, ++{ 0x00>>2, 0x28>>2, 0x7c>>2, 0x28>>2, 0x7c>>2, 0x28>>2, 0x00>>2, 0x00>>2, }, ++{ 0x10>>2, 0x3c>>2, 0x50>>2, 0x38>>2, 0x14>>2, 0x78>>2, 0x10>>2, 0x00>>2, }, ++{ 0x60>>2, 0x64>>2, 0x08>>2, 0x10>>2, 0x20>>2, 0x4c>>2, 0x0c>>2, 0x00>>2, }, ++{ 0x38>>2, 0x40>>2, 0x40>>2, 0x20>>2, 0x54>>2, 0x48>>2, 0x34>>2, 0x00>>2, }, ++{ 0x10>>2, 0x20>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, }, ++{ 0x04>>2, 0x08>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x08>>2, 0x04>>2, 0x00>>2, }, ++{ 0x40>>2, 0x20>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x20>>2, 0x40>>2, 0x00>>2, }, ++{ 0x00>>2, 0x10>>2, 0x54>>2, 0x38>>2, 0x54>>2, 0x10>>2, 0x00>>2, 0x00>>2, }, ++{ 0x00>>2, 0x10>>2, 0x10>>2, 0x7c>>2, 0x10>>2, 0x10>>2, 0x00>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x10>>2, 0x10>>2, 0x20>>2, }, ++{ 0x00>>2, 0x00>>2, 0x00>>2, 0x7c>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x10>>2, 0x10>>2, 0x00>>2, }, ++{ 0x04>>2, 0x04>>2, 0x08>>2, 0x08>>2, 0x10>>2, 0x10>>2, 0x20>>2, 0x20>>2, }, ++{ 0x38>>2, 0x44>>2, 0x4c>>2, 0x54>>2, 0x64>>2, 0x44>>2, 0x38>>2, 0x00>>2, }, ++{ 0x10>>2, 0x30>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x00>>2, }, ++{ 0x38>>2, 0x44>>2, 0x04>>2, 0x08>>2, 0x10>>2, 0x20>>2, 0x7c>>2, 0x00>>2, }, ++{ 0x38>>2, 0x44>>2, 0x04>>2, 0x18>>2, 0x04>>2, 0x44>>2, 0x38>>2, 0x00>>2, }, ++{ 0x18>>2, 0x18>>2, 0x28>>2, 0x28>>2, 0x7c>>2, 0x08>>2, 0x1c>>2, 0x00>>2, }, ++{ 0x7c>>2, 0x40>>2, 0x78>>2, 0x04>>2, 0x04>>2, 0x44>>2, 0x38>>2, 0x00>>2, }, ++{ 0x18>>2, 0x20>>2, 0x40>>2, 0x78>>2, 0x44>>2, 0x44>>2, 0x38>>2, 0x00>>2, }, ++{ 0x7c>>2, 0x44>>2, 0x04>>2, 0x08>>2, 0x08>>2, 0x10>>2, 0x10>>2, 0x00>>2, }, ++{ 0x38>>2, 0x44>>2, 0x44>>2, 0x38>>2, 0x44>>2, 0x44>>2, 0x38>>2, 0x00>>2, }, ++{ 0x38>>2, 0x44>>2, 0x44>>2, 0x3c>>2, 0x04>>2, 0x08>>2, 0x30>>2, 0x00>>2, }, ++{ 0x00>>2, 0x10>>2, 0x10>>2, 0x00>>2, 0x00>>2, 0x10>>2, 0x10>>2, 0x00>>2, }, ++{ 0x00>>2, 0x10>>2, 0x10>>2, 0x00>>2, 0x00>>2, 0x10>>2, 0x10>>2, 0x20>>2, }, ++{ 0x00>>2, 0x0c>>2, 0x30>>2, 0xc0>>2, 0x30>>2, 0x0c>>2, 0x00>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x7c>>2, 0x00>>2, 0x7c>>2, 0x00>>2, 0x00>>2, 0x00>>2, }, ++{ 0x00>>2, 0xc0>>2, 0x30>>2, 0x0c>>2, 0x30>>2, 0xc0>>2, 0x00>>2, 0x00>>2, }, ++{ 0x38>>2, 0x44>>2, 0x04>>2, 0x08>>2, 0x10>>2, 0x00>>2, 0x10>>2, 0x00>>2, }, ++{ 0x38>>2, 0x44>>2, 0x5c>>2, 0x5c>>2, 0x58>>2, 0x40>>2, 0x38>>2, 0x00>>2, }, ++{ 0x10>>2, 0x28>>2, 0x44>>2, 0x44>>2, 0x7c>>2, 0x44>>2, 0x44>>2, 0x00>>2, }, ++{ 0x78>>2, 0x44>>2, 0x44>>2, 0x78>>2, 0x44>>2, 0x44>>2, 0x78>>2, 0x00>>2, }, ++{ 0x38>>2, 0x44>>2, 0x40>>2, 0x40>>2, 0x40>>2, 0x44>>2, 0x38>>2, 0x00>>2, }, ++{ 0x70>>2, 0x48>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x48>>2, 0x70>>2, 0x00>>2, }, ++{ 0x7c>>2, 0x40>>2, 0x40>>2, 0x78>>2, 0x40>>2, 0x40>>2, 0x7c>>2, 0x00>>2, }, ++{ 0x7c>>2, 0x40>>2, 0x40>>2, 0x78>>2, 0x40>>2, 0x40>>2, 0x40>>2, 0x00>>2, }, ++{ 0x38>>2, 0x44>>2, 0x40>>2, 0x4c>>2, 0x44>>2, 0x44>>2, 0x3c>>2, 0x00>>2, }, ++{ 0x44>>2, 0x44>>2, 0x44>>2, 0x7c>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x00>>2, }, ++{ 0x7c>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x7c>>2, 0x00>>2, }, ++{ 0x1c>>2, 0x04>>2, 0x04>>2, 0x04>>2, 0x44>>2, 0x44>>2, 0x38>>2, 0x00>>2, }, ++{ 0x44>>2, 0x48>>2, 0x50>>2, 0x60>>2, 0x50>>2, 0x48>>2, 0x44>>2, 0x00>>2, }, ++{ 0x40>>2, 0x40>>2, 0x40>>2, 0x40>>2, 0x40>>2, 0x40>>2, 0x7c>>2, 0x00>>2, }, ++{ 0x44>>2, 0x6c>>2, 0x54>>2, 0x54>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x00>>2, }, ++{ 0x44>>2, 0x64>>2, 0x64>>2, 0x54>>2, 0x4c>>2, 0x4c>>2, 0x44>>2, 0x00>>2, }, ++{ 0x38>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x38>>2, 0x00>>2, }, ++{ 0x78>>2, 0x44>>2, 0x44>>2, 0x78>>2, 0x40>>2, 0x40>>2, 0x40>>2, 0x00>>2, }, ++{ 0x38>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x38>>2, 0x0c>>2, }, ++{ 0x78>>2, 0x44>>2, 0x44>>2, 0x78>>2, 0x50>>2, 0x48>>2, 0x44>>2, 0x00>>2, }, ++{ 0x38>>2, 0x44>>2, 0x40>>2, 0x38>>2, 0x04>>2, 0x44>>2, 0x38>>2, 0x00>>2, }, ++{ 0x7c>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x00>>2, }, ++{ 0x44>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x38>>2, 0x00>>2, }, ++{ 0x44>>2, 0x44>>2, 0x44>>2, 0x28>>2, 0x28>>2, 0x10>>2, 0x10>>2, 0x00>>2, }, ++{ 0x44>>2, 0x44>>2, 0x44>>2, 0x54>>2, 0x54>>2, 0x6c>>2, 0x44>>2, 0x00>>2, }, ++{ 0x44>>2, 0x44>>2, 0x28>>2, 0x10>>2, 0x28>>2, 0x44>>2, 0x44>>2, 0x00>>2, }, ++{ 0x44>>2, 0x44>>2, 0x28>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x00>>2, }, ++{ 0x7c>>2, 0x04>>2, 0x08>>2, 0x10>>2, 0x20>>2, 0x40>>2, 0x7c>>2, 0x00>>2, }, ++{ 0x1c>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x1c>>2, 0x00>>2, }, ++{ 0x20>>2, 0x20>>2, 0x10>>2, 0x10>>2, 0x08>>2, 0x08>>2, 0x04>>2, 0x04>>2, }, ++{ 0x70>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x70>>2, 0x00>>2, }, ++{ 0x10>>2, 0x28>>2, 0x44>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0xfc>>2, 0x00>>2, }, ++{ 0x10>>2, 0x08>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x3c>>2, 0x44>>2, 0x44>>2, 0x4c>>2, 0x34>>2, 0x00>>2, }, ++{ 0x40>>2, 0x40>>2, 0x78>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x78>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x3c>>2, 0x40>>2, 0x40>>2, 0x40>>2, 0x3c>>2, 0x00>>2, }, ++{ 0x04>>2, 0x04>>2, 0x3c>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x3c>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x38>>2, 0x44>>2, 0x7c>>2, 0x40>>2, 0x38>>2, 0x00>>2, }, ++{ 0x1c>>2, 0x20>>2, 0x78>>2, 0x20>>2, 0x20>>2, 0x20>>2, 0x20>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x3c>>2, 0x44>>2, 0x44>>2, 0x3c>>2, 0x04>>2, 0x38>>2, }, ++{ 0x40>>2, 0x40>>2, 0x78>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x00>>2, }, ++{ 0x10>>2, 0x00>>2, 0x30>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x38>>2, 0x00>>2, }, ++{ 0x08>>2, 0x00>>2, 0x38>>2, 0x08>>2, 0x08>>2, 0x08>>2, 0x08>>2, 0x70>>2, }, ++{ 0x40>>2, 0x40>>2, 0x48>>2, 0x50>>2, 0x60>>2, 0x50>>2, 0x48>>2, 0x00>>2, }, ++{ 0x30>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x38>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x68>>2, 0x54>>2, 0x54>>2, 0x54>>2, 0x44>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x58>>2, 0x64>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x38>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x38>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x78>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x78>>2, 0x40>>2, }, ++{ 0x00>>2, 0x00>>2, 0x3c>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x3c>>2, 0x04>>2, }, ++{ 0x00>>2, 0x00>>2, 0x58>>2, 0x60>>2, 0x40>>2, 0x40>>2, 0x40>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x3c>>2, 0x40>>2, 0x38>>2, 0x04>>2, 0x78>>2, 0x00>>2, }, ++{ 0x10>>2, 0x10>>2, 0x7c>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x0c>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x4c>>2, 0x34>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x6c>>2, 0x28>>2, 0x28>>2, 0x10>>2, 0x10>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x44>>2, 0x54>>2, 0x54>>2, 0x54>>2, 0x28>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x44>>2, 0x28>>2, 0x10>>2, 0x28>>2, 0x44>>2, 0x00>>2, }, ++{ 0x00>>2, 0x00>>2, 0x44>>2, 0x44>>2, 0x44>>2, 0x3c>>2, 0x04>>2, 0x38>>2, }, ++{ 0x00>>2, 0x00>>2, 0x7c>>2, 0x08>>2, 0x10>>2, 0x20>>2, 0x7c>>2, 0x00>>2, }, ++{ 0x04>>2, 0x08>>2, 0x08>>2, 0x10>>2, 0x08>>2, 0x08>>2, 0x04>>2, 0x00>>2, }, ++{ 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x10>>2, 0x00>>2, }, ++{ 0x40>>2, 0x20>>2, 0x20>>2, 0x10>>2, 0x20>>2, 0x20>>2, 0x40>>2, 0x00>>2, }, ++{ 0x20>>2, 0x54>>2, 0x08>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, 0x00>>2, }, ++{ 0x00>>2, 0x10>>2, 0x10>>2, 0x28>>2, 0x28>>2, 0x44>>2, 0x7c>>2, 0x00>>2, }, ++}; ++ ++static void paint_bg(unsigned short *screen, int W, int y, int height, unsigned short bg_color){ ++ int x_bg, y_bg; ++ for(y_bg = y; y_bg < y+height; y_bg++){ ++ for(x_bg = 0; x_bg < W; x_bg++){ ++ screen[AT(x_bg, y_bg)] = bg_color; ++ } ++ } ++} ++ ++/* note: may use 1 extra pixel on the right */ ++void basic_text_out16_bg(void *fb, int w, int h, int x, int y, ++ unsigned short fg_color, unsigned short bg_color, const char *text) ++{ ++ int i, l; ++ int W = w; ++ int cur_line = 0; ++ unsigned short *screen; ++ unsigned short *screen_line_start; ++ unsigned short val = fg_color; ++ unsigned short font_width = 8; ++ unsigned short font_height = 8; ++ unsigned short y_padding_lines = 6; ++ ++ /* Paint background */ ++ paint_bg((unsigned short *)fb, W, y, y_padding_lines, bg_color); ++ ++ /* Draw chars */ ++ cur_line = y+y_padding_lines; ++ //printk("New line, y=%d\n", cur_line); ++ paint_bg((unsigned short *)fb, W, cur_line, font_height+y_padding_lines, bg_color); ++ screen = (unsigned short *)fb + x + cur_line * w; ++ screen_line_start = screen; ++ for (i = 0; ; i++, screen += font_width) ++ { ++ char c = text[i]; ++ //printk("c=%c,0x%02X,%d\n", c, c, c); ++ ++ if (c == 0) ++ break; ++ ++ if(screen >= screen_line_start + w || (c == '\n') || (c == '^')){ ++ cur_line += (font_height + y_padding_lines); ++ //printk("New line, y=%d\n", cur_line); ++ if(cur_line+font_height >= h) // reached bottom of screen ++ break; ++ else{ ++ paint_bg((unsigned short *)fb, W, cur_line, font_height+y_padding_lines, bg_color); ++ screen = (unsigned short *)fb + x + cur_line * w; ++ screen_line_start = screen; ++ } ++ } ++ ++ if (c == ' ' || c == '\n' || (c == '^')) ++ continue; ++ ++ for (l = 0; l < font_height; l++) ++ { ++ unsigned char fd = fontdata8x8[c * font_width + l]; ++ unsigned short *s = screen + l * w; ++ ++ if (fd&0x80) s[0] = val; ++ if (fd&0x40) s[1] = val; ++ if (fd&0x20) s[2] = val; ++ if (fd&0x10) s[3] = val; ++ if (fd&0x08) s[4] = val; ++ if (fd&0x04) s[5] = val; ++ if (fd&0x02) s[6] = val; ++ if (fd&0x01) s[7] = val; ++ ++#if 0 ++ // draw "shadow" (RGB1555 compatible) ++ unsigned char fd1, fdp = 0; ++ if (l > 0) ++ fdp = fontdata8x8[c * font_width + l - 1]; ++ ++ for (fd1 = 0x80; fd1 != 0; fd1 >>= 1, s++) ++ if (!(fd & (fd1 >> 1)) && ((fdp | fd) & fd1)) ++ s[1] = (s[1] >> 1) & 0x39ef; ++#endif ++ } ++ } ++} ++ ++/* note: may use 1 extra pixel on the right */ ++void basic_text_out16_nf(void *fb, int w, int h, int x, int y, ++ unsigned short fg_color, const char *text) ++{ ++ int i, l; ++ int cur_line = 0; ++ unsigned short *screen; ++ unsigned short *screen_line_start; ++ unsigned short val = fg_color; ++ unsigned short font_width = 8; ++ unsigned short font_height = 8; ++ unsigned short y_padding_lines = 6; ++ ++ /* Draw chars */ ++ cur_line = y+y_padding_lines; ++ //printk("New line, y=%d\n", cur_line); ++ screen = (unsigned short *)fb + x + cur_line * w; ++ screen_line_start = screen; ++ for (i = 0; ; i++, screen += font_width) ++ { ++ char c = text[i]; ++ //printk("c=%c,0x%02X,%d\n", c, c, c); ++ ++ if (c == 0) ++ break; ++ ++ if(screen >= screen_line_start + w || (c == '\n') || (c == '^')){ ++ cur_line += (font_height + y_padding_lines); ++ //printk("New line, y=%d\n", cur_line); ++ if(cur_line+font_height >= h) // reached bottom of screen ++ break; ++ else{ ++ screen = (unsigned short *)fb + x + cur_line * w; ++ screen_line_start = screen; ++ } ++ } ++ ++ if (c == ' ' || c == '\n' || (c == '^')) ++ continue; ++ ++ for (l = 0; l < font_height; l++) ++ { ++ unsigned char fd = fontdata8x8[c * font_width + l]; ++ unsigned short *s = screen + l * w; ++ unsigned char fd1, fdp = 0; ++ ++ if (fd&0x80) s[0] = val; ++ if (fd&0x40) s[1] = val; ++ if (fd&0x20) s[2] = val; ++ if (fd&0x10) s[3] = val; ++ if (fd&0x08) s[4] = val; ++ if (fd&0x04) s[5] = val; ++ if (fd&0x02) s[6] = val; ++ if (fd&0x01) s[7] = val; ++ ++ // draw "shadow" (RGB1555 compatible) ++ if (l > 0) ++ fdp = fontdata8x8[c * font_width + l - 1]; ++ ++ for (fd1 = 0x80; fd1 != 0; fd1 >>= 1, s++) ++ if (!(fd & (fd1 >> 1)) && ((fdp | fd) & fd1)) ++ s[1] = (s[1] >> 1) & 0x39ef; ++ } ++ } ++} ++ ++void basic_text_out_uyvy_nf(void *fb, int w, int x, int y, const char *text) ++{ ++ int i, l; ++ unsigned short *screen; ++ ++ screen = (unsigned short *)fb + x + y * w; ++ for (i = 0; ; i++, screen += 8) ++ { ++ char c = text[i]; ++ if (c == 0) ++ break; ++ if (c == ' ') ++ continue; ++ ++ for (l = 0; l < 8; l++) ++ { ++ unsigned char fd = fontdata8x8[c * 8 + l]; ++ unsigned char *s = (void *)(screen + l * w); ++ unsigned char fd1, fdp = 0; ++ ++ if (fd&0x80) s[0 * 2 + 1] = 235; ++ if (fd&0x40) s[1 * 2 + 1] = 235; ++ if (fd&0x20) s[2 * 2 + 1] = 235; ++ if (fd&0x10) s[3 * 2 + 1] = 235; ++ if (fd&0x08) s[4 * 2 + 1] = 235; ++ if (fd&0x04) s[5 * 2 + 1] = 235; ++ if (fd&0x02) s[6 * 2 + 1] = 235; ++ if (fd&0x01) s[7 * 2 + 1] = 235; ++ ++ // draw "shadow" ++ if (l > 0) ++ fdp = fontdata8x8[c * 8 + l - 1]; ++ ++ for (fd1 = 0x80; fd1 != 0; fd1 >>= 1, s += 2) ++ if (!(fd & (fd1 >> 1)) && ((fdp | fd) & fd1)) ++ s[1] /= 2; ++ } ++ } ++} ++ ++void basic_text_out16(void *fb, int w, int h, int x, int y, ++ unsigned short fg_color, const char *texto, ...) ++{ ++ va_list args; ++ char buffer[256]; ++ ++ va_start(args, texto); ++ vsnprintf(buffer, sizeof(buffer), texto, args); ++ va_end(args); ++ ++ basic_text_out16_nf(fb, w, h, x, y, fg_color, buffer); ++} ++ ++ ++void DrawText(u16 *framebuffer, int framebufferWidth, int framebufferStrideBytes, int framebufferHeight, const char *text, int x, int y, u16 color, u16 bgColor) ++{ ++ int W = framebufferWidth; ++ int H = framebufferHeight; ++ int Y = y; ++ int X = x; ++ int cur_x; ++ int endX = x + MONACO_WIDTH; ++ int yEnd = Y + MONACO_HEIGHT - 1; ++ int i; ++ u8 *byte; ++ u8 bit; ++ ++ framebufferStrideBytes >>= 1; // to uint16 elements ++ while(*text) ++ { ++ u8 ch = (u8)*text; ++ ++ if (ch < 32 || ch >= 127) { ++ ch = 0; ++ return; ++ } ++ else ch -= 32; ++ ++ X = x; ++ endX = x + MONACO_WIDTH; ++ ++ for(y = Y-1; y < Y + monaco_height_adjust[ch]; ++y) ++ for( cur_x = X; cur_x < endX+1; ++cur_x) ++ if (cur_x >= 0 && y >= 0 && cur_x < W && y < H) ++ { ++ framebuffer[AT(cur_x,y)] = bgColor; ++ } ++ ++ y = Y + monaco_height_adjust[ch]; ++ yEnd = Y + MONACO_HEIGHT - 1; ++ ++ byte = monaco_font + ch*MONACO_BYTES_PER_CHAR; ++ for( i = 0; i < MONACO_BYTES_PER_CHAR; ++i, ++byte) ++ { ++ for( bit = 1; bit; bit <<= 1) ++ { ++ if (x >= 0 && y >= 0 && x < W && y < H) ++ { ++ if ((*byte & bit)) framebuffer[AT(x,y)] = color; ++ else framebuffer[AT(x,y)] = bgColor; ++ } ++ ++x; ++ if (x == endX) ++ { ++ if (y < H) framebuffer[AT(x,y)] = bgColor; ++ x = X; ++ ++y; ++ if (y == yEnd) ++ { ++ i = MONACO_BYTES_PER_CHAR; ++ bit = 0; ++ break; ++ } ++ } ++ } ++ } ++ ++text; ++ x += 6; ++ } ++} diff --git a/drivers/staging/fbtft/fb_text.h b/drivers/staging/fbtft/fb_text.h new file mode 100644 index 0000000..1352bdb --- /dev/null +++ b/drivers/staging/fbtft/fb_text.h @@ -0,0 +1,26 @@ -+#ifndef __LINUX_FBTFT_TEXT_H -+#define __LINUX_FBTFT_TEXT_H -+ -+#include "fbtft.h" -+ -+#define MONACO_WIDTH 5 -+#define MONACO_HEIGHT 8 -+#define MONACO_BYTES_PER_CHAR (MONACO_WIDTH*MONACO_HEIGHT/8) -+ -+#define RGB565(r, g, b) (((r&0x1f) << 11) | ((g&0x3f) << 5) | (b&0x1f)) -+ -+void DrawText(u16 *framebuffer, int framebufferWidth, int framebufferStrideBytes, int framebufferHeight, const char *text, int x, int y, u16 color, u16 bgColor); -+ -+ -+/*extern unsigned char fontdata8x8[64*16]; -+extern unsigned char fontdata6x8[256-32][8];*/ -+ -+void basic_text_out16_bg(void *fb, int w, int h, int x, int y, -+ unsigned short fg_color, unsigned short bg_color, const char *text); -+void basic_text_out16_nf(void *fb, int w, int h, int x, int y, -+ unsigned short fg_color, const char *text); -+void basic_text_out16(void *fb, int w, int h, int x, int y, -+ unsigned short fg_color, const char *texto, ...); -+void basic_text_out_uyvy_nf(void *fb, int w, int x, int y, const char *text); -+ ++#ifndef __LINUX_FBTFT_TEXT_H ++#define __LINUX_FBTFT_TEXT_H ++ ++#include "fbtft.h" ++ ++#define MONACO_WIDTH 5 ++#define MONACO_HEIGHT 8 ++#define MONACO_BYTES_PER_CHAR (MONACO_WIDTH*MONACO_HEIGHT/8) ++ ++#define RGB565(r, g, b) (((r&0x1f) << 11) | ((g&0x3f) << 5) | (b&0x1f)) ++ ++void DrawText(u16 *framebuffer, int framebufferWidth, int framebufferStrideBytes, int framebufferHeight, const char *text, int x, int y, u16 color, u16 bgColor); ++ ++ ++/*extern unsigned char fontdata8x8[64*16]; ++extern unsigned char fontdata6x8[256-32][8];*/ ++ ++void basic_text_out16_bg(void *fb, int w, int h, int x, int y, ++ unsigned short fg_color, unsigned short bg_color, const char *text); ++void basic_text_out16_nf(void *fb, int w, int h, int x, int y, ++ unsigned short fg_color, const char *text); ++void basic_text_out16(void *fb, int w, int h, int x, int y, ++ unsigned short fg_color, const char *texto, ...); ++void basic_text_out_uyvy_nf(void *fb, int w, int x, int y, const char *text); ++ +#endif //__LINUX_FBTFT_TEXT_H \ No newline at end of file diff --git a/drivers/staging/fbtft/fbtft-bus.c b/drivers/staging/fbtft/fbtft-bus.c @@ -2751,7 +2751,7 @@ index 488ab78..e6b4c59 100644 -#define FBTFT_OF_INIT_CMD BIT(24) -#define FBTFT_OF_INIT_DELAY BIT(25) -+#define FBTFT_NOTIF_MAX_SIZE 400 ++#define FBTFT_NOTIF_MAX_SIZE 256 + +#define FBTFT_OF_INIT_CMD BIT(24) +#define FBTFT_OF_INIT_DELAY BIT(25) diff --git a/FunKey/board/funkey/patches/linux/0027-increased-notification-zone-size-fbtft.patch b/FunKey/board/funkey/patches/linux/0027-increased-notification-zone-size-fbtft.patch new file mode 100644 index 0000000..8af79b2 --- /dev/null +++ b/FunKey/board/funkey/patches/linux/0027-increased-notification-zone-size-fbtft.patch @@ -0,0 +1,25 @@ +From 4e80937d23c58478e8a3ffe3a5cdb4114497c638 Mon Sep 17 00:00:00 2001 +From: vincent +Date: Tue, 29 Sep 2020 08:32:44 +0200 +Subject: [PATCH] increasd buffer size for fb_tft_notif zone to 400 + +--- + drivers/staging/fbtft/fbtft.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h +index 8a9daee..4638ad9 100644 +--- a/drivers/staging/fbtft/fbtft.h ++++ b/drivers/staging/fbtft/fbtft.h +@@ -28,7 +28,7 @@ + #define FBTFT_GAMMA_MAX_VALUES_TOTAL 128 + #define FBTFT_OVERLAY_NB_VALUES 4 + +-#define FBTFT_NOTIF_MAX_SIZE 256 ++#define FBTFT_NOTIF_MAX_SIZE 400 + + #define FBTFT_OF_INIT_CMD BIT(24) + #define FBTFT_OF_INIT_DELAY BIT(25) +-- +1.9.1 +