Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.vscode
build

examples/virtualPanel/antialias_font/antialias_font.dSYM/Contents/Info.plist
examples/virtualPanel/antialias_font/antialias_font.dSYM/Contents/Resources/DWARF/antialias_font
examples/virtualPanel/antialias_font/antialias_font.dSYM/Contents/Resources/Relocations/aarch64/antialias_font.yml
examples/virtualPanel/antialias_font/antialias_font
210 changes: 210 additions & 0 deletions examples/virtualPanel/antialias_font/Lora_16.h

Large diffs are not rendered by default.

136 changes: 136 additions & 0 deletions examples/virtualPanel/antialias_font/Lora_8.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
//
// Created with fontconvert, written by Larry Bank
// Point size: 8, first: 32, last: 127
// compressed font data size = 2008 bytes
//
// for non-Arduino builds...
#ifndef PROGMEM
#define PROGMEM
#endif
const uint8_t Lora_8[] PROGMEM = {
0xf2,0xbb,0x20,0x00,0x7f,0x00,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x04,
0x01,0x00,0x00,0x00,0x02,0x00,0x02,0x04,0x0b,0x01,0xf6,0x00,0x08,0x00,0x03,0x05,
0x03,0x01,0xf6,0x00,0x0b,0x00,0x0b,0x0d,0x0b,0x01,0xf6,0x00,0x20,0x00,0x07,0x08,
0x0f,0x01,0xf4,0x00,0x35,0x00,0x0c,0x0e,0x0b,0x01,0xf6,0x00,0x4e,0x00,0x0a,0x0b,
0x0b,0x01,0xf6,0x00,0x64,0x00,0x01,0x03,0x03,0x01,0xf6,0x00,0x66,0x00,0x04,0x05,
0x10,0x01,0xf5,0x00,0x72,0x00,0x04,0x05,0x10,0x00,0xf5,0x00,0x7f,0x00,0x07,0x08,
0x06,0x01,0xf6,0x00,0x8b,0x00,0x07,0x08,0x07,0x01,0xf8,0x00,0x95,0x00,0x02,0x04,
0x05,0x01,0xff,0x00,0x99,0x00,0x06,0x08,0x02,0x01,0xfb,0x00,0x9c,0x00,0x02,0x04,
0x02,0x01,0xff,0x00,0x9e,0x00,0x0b,0x0b,0x10,0x00,0xf5,0x00,0xad,0x00,0x08,0x0a,
0x0b,0x01,0xf6,0x00,0xbb,0x00,0x05,0x06,0x0b,0x00,0xf6,0x00,0xc6,0x00,0x07,0x08,
0x0b,0x01,0xf6,0x00,0xd3,0x00,0x07,0x09,0x0b,0x01,0xf6,0x00,0xe0,0x00,0x08,0x09,
0x0b,0x00,0xf6,0x00,0xf0,0x00,0x07,0x09,0x0c,0x01,0xf5,0x00,0xfe,0x00,0x07,0x09,
0x0b,0x01,0xf6,0x00,0x0e,0x01,0x07,0x07,0x0b,0x00,0xf6,0x00,0x18,0x01,0x07,0x09,
0x0b,0x01,0xf6,0x00,0x2a,0x01,0x07,0x09,0x0b,0x01,0xf6,0x00,0x3a,0x01,0x02,0x04,
0x08,0x01,0xf9,0x00,0x3e,0x01,0x02,0x04,0x0b,0x01,0xf9,0x00,0x44,0x01,0x07,0x08,
0x08,0x01,0xf8,0x00,0x50,0x01,0x07,0x08,0x03,0x01,0xfa,0x00,0x54,0x01,0x07,0x08,
0x08,0x01,0xf8,0x00,0x5e,0x01,0x06,0x07,0x0b,0x01,0xf6,0x00,0x6a,0x01,0x0b,0x0c,
0x0c,0x01,0xf7,0x00,0x87,0x01,0x0a,0x0a,0x0b,0x00,0xf6,0x00,0x98,0x01,0x08,0x0a,
0x0b,0x01,0xf6,0x00,0xa7,0x01,0x09,0x0b,0x0b,0x01,0xf6,0x00,0xb4,0x01,0x0a,0x0c,
0x0b,0x01,0xf6,0x00,0xc3,0x01,0x08,0x0a,0x0b,0x01,0xf6,0x00,0xd2,0x01,0x07,0x09,
0x0b,0x01,0xf6,0x00,0xe0,0x01,0x0b,0x0c,0x0b,0x01,0xf6,0x00,0xf1,0x01,0x0a,0x0c,
0x0b,0x01,0xf6,0x00,0x00,0x02,0x03,0x05,0x0b,0x01,0xf6,0x00,0x09,0x02,0x05,0x06,
0x0b,0x00,0xf6,0x00,0x12,0x02,0x0a,0x0b,0x0b,0x01,0xf6,0x00,0x25,0x02,0x08,0x09,
0x0b,0x01,0xf6,0x00,0x30,0x02,0x0d,0x0e,0x0b,0x01,0xf6,0x00,0x47,0x02,0x0a,0x0c,
0x0b,0x01,0xf6,0x00,0x5a,0x02,0x0b,0x0c,0x0b,0x01,0xf6,0x00,0x6b,0x02,0x08,0x0a,
0x0b,0x01,0xf6,0x00,0x79,0x02,0x0b,0x0c,0x0e,0x01,0xf6,0x00,0x8e,0x02,0x09,0x0a,
0x0b,0x01,0xf6,0x00,0xa0,0x02,0x07,0x09,0x0b,0x01,0xf6,0x00,0xae,0x02,0x0a,0x0a,
0x0b,0x00,0xf6,0x00,0xb8,0x02,0x0b,0x0c,0x0b,0x00,0xf6,0x00,0xc6,0x02,0x0b,0x0a,
0x0b,0x00,0xf6,0x00,0xd5,0x02,0x10,0x10,0x0b,0x00,0xf6,0x00,0xeb,0x02,0x0a,0x0a,
0x0b,0x00,0xf6,0x00,0xfc,0x02,0x0a,0x0a,0x0b,0x00,0xf6,0x00,0x0a,0x03,0x08,0x0a,
0x0b,0x01,0xf6,0x00,0x16,0x03,0x04,0x06,0x10,0x01,0xf5,0x00,0x1d,0x03,0x0b,0x0b,
0x10,0x00,0xf5,0x00,0x30,0x03,0x04,0x06,0x10,0x00,0xf5,0x00,0x39,0x03,0x0b,0x0d,
0x04,0x01,0xf6,0x00,0x43,0x03,0x0a,0x0b,0x01,0x01,0x02,0x00,0x45,0x03,0x02,0x04,
0x03,0x01,0xf5,0x00,0x49,0x03,0x07,0x08,0x08,0x01,0xf9,0x00,0x55,0x03,0x08,0x09,
0x0c,0x00,0xf5,0x00,0x64,0x03,0x07,0x08,0x08,0x01,0xf9,0x00,0x6f,0x03,0x08,0x09,
0x0c,0x01,0xf5,0x00,0x7f,0x03,0x07,0x09,0x08,0x01,0xf9,0x00,0x8b,0x03,0x06,0x05,
0x0c,0x00,0xf5,0x00,0x98,0x03,0x08,0x09,0x0d,0x01,0xf8,0x00,0xac,0x03,0x09,0x09,
0x0c,0x00,0xf5,0x00,0xbb,0x03,0x03,0x04,0x0b,0x01,0xf6,0x00,0xc6,0x03,0x04,0x04,
0x0f,0xff,0xf6,0x00,0xd0,0x03,0x08,0x08,0x0c,0x00,0xf5,0x00,0xe1,0x03,0x04,0x04,
0x0c,0x00,0xf5,0x00,0xeb,0x03,0x0d,0x0e,0x08,0x01,0xf9,0x00,0xfb,0x03,0x08,0x0a,
0x08,0x01,0xf9,0x00,0x06,0x04,0x08,0x09,0x08,0x01,0xf9,0x00,0x12,0x04,0x09,0x09,
0x0c,0x00,0xf9,0x00,0x21,0x04,0x08,0x09,0x0c,0x01,0xf9,0x00,0x30,0x04,0x06,0x07,
0x08,0x01,0xf9,0x00,0x3a,0x04,0x06,0x07,0x08,0x01,0xf9,0x00,0x46,0x04,0x06,0x06,
0x0a,0x00,0xf7,0x00,0x53,0x04,0x09,0x09,0x08,0x00,0xf9,0x00,0x60,0x04,0x08,0x08,
0x08,0x00,0xf9,0x00,0x6c,0x04,0x0d,0x0d,0x08,0x00,0xf9,0x00,0x7d,0x04,0x08,0x08,
0x08,0x00,0xf9,0x00,0x8b,0x04,0x08,0x08,0x0c,0x00,0xf9,0x00,0x9a,0x04,0x06,0x08,
0x08,0x01,0xf9,0x00,0xa3,0x04,0x05,0x05,0x10,0x00,0xf5,0x00,0xb1,0x04,0x01,0x04,
0x10,0x01,0xf5,0x00,0xb4,0x04,0x05,0x05,0x10,0x00,0xf5,0x00,0xc1,0x04,0x07,0x08,
0x02,0x01,0xfb,0x00,0xc6,0x04,0x06,0x08,0x08,0x01,0xf9,0x00,0x50,0x00,0xf0,0x97,
0xfb,0xc3,0x80,0x00,0x09,0x7f,0x00,0x20,0x84,0x2d,0x7d,0x6b,0xe1,0x08,0x70,0xc8,
0x58,0x2f,0xff,0x88,0x87,0x20,0x44,0x2c,0x2f,0xad,0x78,0x00,0x20,0x60,0xbf,0x09,
0x02,0x56,0xff,0x63,0x08,0x85,0x6c,0x3c,0x37,0xb6,0xfd,0x43,0x58,0x24,0x17,0xc0,
0x00,0x20,0x24,0x74,0x2b,0x23,0x2b,0xf5,0xe9,0x7a,0x54,0x09,0x24,0x44,0xb0,0x69,
0x04,0x17,0xab,0xd2,0xfa,0x4f,0xd2,0x83,0x80,0x00,0x20,0x44,0x92,0x88,0x5f,0xfe,
0xfd,0xd2,0xd3,0x22,0x51,0x08,0x13,0x7a,0x6f,0xdb,0xb6,0xe1,0x10,0xd0,0xa0,0x00,
0xe0,0x00,0x20,0x7a,0x5a,0x5f,0x1d,0x7f,0xfd,0x02,0x0b,0xf6,0xbb,0x00,0x05,0x40,
0x82,0xda,0xfe,0xfd,0xff,0xf5,0xfa,0xfd,0x2b,0x80,0x00,0x20,0x40,0xb7,0x87,0x0e,
0x12,0x0b,0xbd,0x02,0x05,0x80,0x00,0x20,0x60,0xbf,0xe2,0x0c,0x81,0x82,0xff,0x80,
0x00,0x56,0x12,0xf7,0x00,0x82,0x80,0x00,0xc0,0x00,0x28,0x9e,0xb4,0xb5,0xeb,0x5e,
0xb4,0xbf,0x4b,0x5e,0xb4,0xbf,0x4a,0x38,0x00,0x20,0x41,0x68,0x85,0xb8,0xdf,0xbe,
0xb7,0xfd,0x42,0x21,0x3e,0xd4,0x00,0x20,0x4b,0x5b,0x05,0xaf,0xff,0x7f,0xfd,0x74,
0xc0,0x00,0x20,0x21,0x58,0x4b,0xeb,0xd7,0xad,0x2c,0x25,0xd5,0xa8,0xc0,0x00,0x20,
0x21,0x58,0x4b,0xeb,0xd2,0xc2,0xe0,0xd7,0x6f,0xe2,0xa0,0x00,0x20,0xa1,0x7e,0xba,
0x08,0x17,0x4b,0xd2,0xff,0x88,0x86,0x41,0x42,0xfd,0x06,0x00,0x20,0xd2,0x62,0x43,
0xbc,0x95,0x10,0x47,0xb7,0xdf,0xaa,0x21,0x90,0x00,0x20,0x4b,0x44,0x32,0x3e,0xd1,
0x0c,0xb0,0x9a,0x7e,0xf0,0x88,0x4a,0xe2,0xa0,0x00,0x90,0xda,0x4b,0xff,0x4b,0xff,
0x4b,0xf5,0x80,0x00,0x20,0x2a,0x24,0x2f,0xde,0xa1,0x10,0xa4,0xb6,0x3d,0x02,0x04,
0xed,0xbf,0xd1,0x0d,0x80,0x00,0x20,0x2a,0x24,0x2f,0x57,0x7e,0xd4,0x22,0x18,0xb1,
0xda,0xba,0x84,0x43,0x20,0x00,0xc2,0xfe,0x1c,0x00,0xc2,0xfe,0xec,0x25,0xee,0x00,
0x20,0xd8,0x4b,0x08,0x28,0x7c,0x22,0x25,0x86,0xb0,0xe0,0x00,0x90,0x72,0x70,0x00,
0x21,0xce,0x11,0x12,0xc3,0xde,0x08,0x28,0x75,0x00,0x52,0x16,0xfa,0xe9,0x68,0x2d,
0x2e,0x1e,0x39,0x11,0xf8,0x00,0x20,0x60,0xb4,0x43,0x42,0xd2,0x04,0x13,0x56,0x82,
0x08,0x2b,0xa5,0xbf,0x4b,0xaf,0xdd,0x52,0xbb,0x09,0x42,0x0a,0x21,0xad,0x91,0x35,
0x86,0x14,0x00,0x20,0x84,0x37,0x7f,0xa0,0x88,0x57,0xbe,0x97,0xf7,0xc7,0xa2,0x1b,
0xfb,0x8b,0x4c,0x00,0x0a,0x40,0x48,0x62,0xff,0xff,0x4b,0x8b,0xe4,0x31,0xf7,0xff,
0x51,0x15,0x00,0x20,0x5a,0x22,0xb1,0x5f,0x4f,0xdf,0x08,0x85,0x2d,0x93,0x10,0x00,
0x05,0x20,0x24,0x34,0x2f,0x6b,0xef,0xff,0xff,0xfd,0x7a,0x51,0x26,0x60,0x00,0x52,
0x02,0x43,0x7f,0xef,0x82,0x0b,0x8f,0x90,0xbf,0x8f,0xaf,0xc4,0x60,0x00,0x90,0x12,
0x19,0xff,0x7c,0x25,0xc7,0xc8,0x5f,0xc7,0xfe,0x21,0xc0,0x00,0x20,0x41,0x68,0x8a,
0xfa,0xe3,0x1a,0xc9,0x8a,0xda,0xba,0xf8,0x44,0x2b,0xd8,0xe0,0x00,0x23,0x90,0x44,
0x25,0xaf,0xff,0xff,0x8f,0x90,0xef,0xff,0xff,0x16,0x98,0x00,0x82,0x09,0x7f,0xff,
0xff,0xff,0xc5,0x80,0x00,0x20,0x38,0x6b,0xff,0xff,0xff,0xef,0x87,0x00,0x23,0x6a,
0x08,0x84,0xc2,0xf4,0xbd,0x2f,0xf8,0xf8,0x22,0x25,0xef,0xf7,0xed,0xc5,0xb0,0xc0,
0x00,0x23,0xa0,0x88,0x4f,0xff,0xff,0xff,0xaf,0xc4,0x60,0x00,0x23,0xea,0x08,0x85,
0x25,0xff,0x68,0x20,0x5e,0x11,0x09,0xff,0xbf,0xf7,0x4a,0xfe,0xff,0xdb,0xff,0xe2,
0xf4,0xc0,0x00,0x22,0xb0,0x88,0x53,0x5d,0xfc,0x22,0x13,0xfd,0xfe,0xdf,0xed,0xfe,
0xff,0xc7,0xef,0x16,0xf0,0x00,0x20,0x40,0xb4,0x45,0x42,0x8a,0xbd,0xea,0xff,0x75,
0xf0,0x88,0x52,0x5b,0x26,0x60,0x00,0x0a,0x40,0x48,0x67,0xfd,0xfa,0xfa,0xe4,0xab,
0x21,0xdf,0xe2,0x1c,0x00,0x20,0x40,0xb4,0x45,0x42,0x8a,0xbd,0xea,0xff,0x75,0xf0,
0x88,0x52,0x5b,0x26,0x72,0x65,0xb7,0xb0,0xc0,0x00,0x05,0x20,0x24,0x30,0x2f,0xbf,
0xfe,0xb9,0x2b,0xc8,0x52,0xfb,0xf6,0xfd,0xe2,0xe1,0x80,0x00,0x20,0x36,0x16,0xed,
0x84,0x42,0xb6,0x1e,0x18,0x70,0xef,0xe4,0xc4,0x00,0x90,0xb2,0x27,0xfa,0xdf,0xff,
0xff,0xfd,0x38,0x00,0x24,0x92,0x04,0x9a,0xff,0xff,0xff,0xff,0xff,0xfb,0x4b,0x64,
0xac,0x00,0x24,0x72,0x02,0x98,0x5f,0xee,0x97,0x7e,0xff,0x69,0x7f,0xbf,0xde,0xf0,
0x00,0x24,0x84,0x32,0x40,0x52,0xc2,0xdf,0xff,0xfb,0x41,0x10,0xa4,0xb7,0xdf,0xff,
0xf8,0x70,0xf7,0x7e,0xbf,0xa8,0x00,0x24,0x72,0x02,0xa1,0x6d,0xfb,0xa5,0xb5,0xff,
0xa0,0x88,0x8e,0x95,0xfb,0x71,0xa6,0x00,0x24,0x72,0x02,0x9a,0xdd,0x2e,0xd2,0xdb,
0xf6,0xff,0xff,0xf4,0xe0,0x00,0x90,0xd5,0xa5,0x4b,0xd6,0x96,0xbd,0x6a,0xa2,0xb1,
0x80,0x00,0x82,0xff,0xff,0xff,0xe0,0xc0,0x00,0x2a,0x90,0x88,0x4f,0x7b,0xec,0x87,
0xef,0x7e,0xf7,0xd9,0x0c,0xfb,0x05,0xde,0xfb,0x5d,0x80,0x00,0x90,0x3f,0xff,0xff,
0xff,0xff,0xf1,0x80,0x00,0x20,0x84,0x72,0x81,0x11,0x9d,0x26,0x14,0x37,0x00,0x80,
0x00,0x56,0x12,0x80,0x00,0x20,0x21,0x58,0x27,0xf4,0xb8,0x40,0x81,0x6f,0xf8,0xb0,
0x00,0x23,0xa0,0x88,0x57,0xff,0x26,0x39,0x13,0x7d,0xff,0xff,0xf5,0xc5,0x40,0x00,
0x20,0x4b,0x44,0x2d,0xba,0xc7,0xbd,0x42,0x21,0xb0,0x00,0x20,0x8b,0x0f,0xff,0x91,
0x5d,0x10,0xcd,0xff,0xff,0x6b,0x08,0x86,0x04,0xc0,0x00,0x20,0x4a,0x18,0x5a,0xb2,
0x54,0x43,0x9e,0xa1,0x10,0xd8,0x00,0x20,0x7a,0x04,0xbd,0xf8,0x87,0x20,0x41,0x7f,
0xff,0xfe,0x9c,0x00,0x20,0xd9,0x0d,0x89,0x0b,0xd5,0xf5,0x7c,0x22,0x19,0x72,0x56,
0x40,0x41,0x10,0xcb,0x07,0xf9,0x32,0x00,0x21,0x24,0x39,0x2f,0xff,0x26,0x59,0x13,
0x7e,0xff,0xff,0xff,0xfd,0xa6,0x00,0x04,0x12,0xc7,0x87,0x08,0x2f,0xff,0xff,0xc5,
0x80,0x00,0x20,0x7b,0xe0,0xb7,0xff,0xff,0xff,0xd4,0x70,0x00,0x21,0x24,0x35,0x2f,
0xff,0x82,0xf8,0x5e,0x97,0x7d,0x10,0x9f,0xbf,0x6f,0xb6,0xc0,0x00,0x04,0x12,0xa5,
0xff,0xff,0xff,0xff,0xfe,0xc0,0x00,0x26,0x21,0x48,0x09,0x0b,0x60,0xbf,0xdf,0xff,
0xff,0xff,0xfc,0x5a,0x69,0x80,0x00,0x0a,0x40,0x48,0x5b,0xf7,0xff,0xff,0xff,0x8b,
0x4c,0x00,0x20,0x41,0x43,0x04,0xe9,0xfb,0xd7,0xda,0xc2,0x21,0xb0,0x00,0x0a,0x40,
0x88,0x5b,0xd5,0xbf,0xff,0xd7,0xfc,0x99,0x64,0x5b,0xff,0x70,0x00,0x20,0x4a,0x18,
0x2d,0x3f,0xff,0xda,0xc2,0x21,0x81,0x71,0xff,0x5e,0xc0,0x00,0x22,0x30,0x82,0x61,
0x2e,0x87,0xff,0xfe,0x2e,0x00,0x20,0x2a,0xc2,0xfc,0x31,0x82,0x22,0x76,0x1b,0xe2,
0xa0,0x00,0x20,0x40,0xbe,0x20,0xc8,0x10,0x2f,0xff,0xd7,0x75,0xc3,0x80,0x00,0x23,
0x4a,0x08,0x85,0x07,0xf5,0xff,0xff,0xf7,0xf8,0x30,0x98,0x00,0x23,0x50,0x44,0x25,
0xae,0xfd,0xd2,0xef,0xdb,0xff,0x80,0x00,0x23,0x64,0x2e,0x08,0x85,0x70,0xbd,0x7d,
0xef,0xe1,0x82,0xa5,0xbc,0x7e,0xd7,0x5c,0x00,0x24,0x32,0x02,0x9a,0xdb,0x4b,0x6f,
0xf4,0x11,0x0a,0xf6,0xe3,0xb0,0x00,0x23,0x70,0x44,0x2a,0xbf,0xdf,0xed,0x2d,0xfe,
0xf7,0xfd,0x2f,0xc2,0x50,0x00,0x90,0xbd,0x2a,0xad,0x2d,0x54,0x56,0x30,0x00,0x20,
0x7a,0x0b,0xff,0xff,0xe1,0xc2,0x21,0x5b,0xff,0xff,0xff,0x0c,0x00,0xff,0xff,0x00,
0x05,0x08,0x10,0x5f,0xff,0xff,0xbe,0xb4,0xbf,0xff,0xfe,0x38,0x00,0x23,0x81,0x11,
0x40,0x00,0x90,0xcf,0xff,0xf1,0x80,0x00};
120 changes: 120 additions & 0 deletions examples/virtualPanel/antialias_font/antialias_font.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
//
// Anti-aliased font example
//
#include <cstdint>

#include "Lora_16.h"
#include "Lora_8.h"
#include "itc40.h"
#include "itc80.h"
#include "nico8.h"
#include "nico16.h"

#include "logo_small.h"
#include <FastEPD.h>
#include <cstdio>
#include <headless.h>

// clang antialias_font.cpp ../../../src/FastEPD.cpp ../../../src/Group5.cpp
// ../../../src/headless.cpp -I ../../../src -D HEADLESS -o antialias_font

FASTEPD epaper;
int width = 800;
int height = 480;

void dump(const char *filename) {
uint8_t *buffer = epaper.currentBuffer();
FILE *output = fopen(filename, "wb");
char buff[64];
snprintf(buff, sizeof(buff), "P5\n%d %d\n255\n", width, height);
fwrite(buff, 1, strlen(buff), output);
int stride = width / 2;
for (int y = 0; y < height; ++y) {
uint8_t *row = buffer + y * stride;
for (int x = 0; x < width / 2; ++x) {
uint8_t col1 = (row[x] >> 4) | row[x];
uint8_t col2 = (row[x] & 0x0f) << 4 | row[x];
fwrite(&col1, 1, 1, output);
fwrite(&col2, 1, 1, output);
}
}
fclose(output);
}

void setup() {
printf("init\n");

BBPANELDEF headlessdef = {width, height};
BBPANELPROCS headlessprocs = {HeadlessEinkPower, HeadlessIOInit,
HeadlessRowControl};

epaper.initCustomPanel(&headlessdef, &headlessprocs);
printf("done init\n");

epaper.setPanelSize(width, height);
epaper.setMode(BB_MODE_4BPP);
epaper.setFont(itc40);
epaper.setTextColor(0);

int steps = 16;
int stepw = 15;
int steph = 10;
int posw = 0;
int posh = 0;
int rw = width;
int rh = height;
for (int i = 0; i < steps; ++i) {
epaper.fillRect(posw, posh, rw, rh, i);
posw += stepw;
posh += steph;
rw -= 2 * stepw;
rh -= 2 * steph;
}
int logodim = 86;
int xoffset = 20;
int yoffset = 50;

// small text
const char *str2 = "Portez ce vieux whisky au juge blond qui fume";

epaper.setFont(nico8, false);
// epaper.getStringBox(str2, &bbox);
// epaper.drawString(str2, (width - bbox.w) / 2, ((height - bbox.h) / 2));
epaper.drawString(str2, 100, 170);
epaper.setFont(nico16, true);
// epaper.getStringBox(str2, &bbox);
// epaper.drawString(str2, (width - bbox.w) / 2, ((height - bbox.h) / 2));
epaper.drawString(str2, 200, 370);

const char *str = "okay";
epaper.setFont(itc40, false);
BBEPRECT bbox;
epaper.getStringBox(str, &bbox);
int posx = 100;
int posy = 100;
epaper.drawString(str, posx, posy);

posx += bbox.w + xoffset * 2;
posy += bbox.h + yoffset * 2;
epaper.setFont(itc80, true);
epaper.drawString(str, posx * 2, posy * 2);

posx += bbox.w + xoffset * 2;
posy += bbox.h + yoffset * 2;
epaper.drawString(str, posx * 2, posy * 2);


epaper.setFont(Lora_8, false);
epaper.drawString(str2, 100, 400);
epaper.setFont(nico16, true);
epaper.drawString(str2, 200, 900);

epaper.loadG5Image(logo_small, (width - logodim) / 2, (height + logodim) / 2,
BBEP_TRANSPARENT, 0);

// epaser.fullUpdate(true, false);
dump("rectangles.pgm");
printf("done\n");
}

void loop() {}
Loading