А я растровые шрифты любого размера и ориентации в текстовом
редакторе рисую :-)
/** @brief Font parameters */ #define DISP_FONT_DIM_X 12 #define DISP_FONT_DIM_Y 16 #define DISP_FONT_IMG_SZ (DISP_FONT_DIM_X*DISP_FONT_DIM_Y/8) /** @brief _DISP_FONT_BIN8_ auxiliary macro for convert 32-bit(8 hex symbols) to 8-bit with swap MSB-LSB (0x10100011ul = 0xA3 -> 0xC5) */ #define _DISP_FONT_BIN8_(b) ((((b)>>28)&0x01) | (((b)>>23)&0x02) | (((b)>>18)&0x04) | (((b)>>13)&0x08) | (((b)>>8)&0x10) | (((b)>>3)&0x20) | (((b)<<2)&0x40) | (((b)<<7)&0x80)) /** @brief DISP_FONT_BIN2X12 convert 2 x 12bit LSB-first binary to 3 x 8bit */ #define DISP_FONT_BIN2X12(even, odd) _DISP_FONT_BIN8_(0x##even##ull>>16), _DISP_FONT_BIN8_((0x##even##ull<<16)|(0x##odd##ull>>32)), _DISP_FONT_BIN8_(0x##odd##ull)
static uint8_t const disp_font[] = { // Code 0x20 - ' ' DISP_FONT_BIN2X12( 000000000000 ,\ 000000000000 ), DISP_FONT_BIN2X12( 000000000000 ,\ 000000000000 ), DISP_FONT_BIN2X12( 000000000000 ,\ 000000000000 ), DISP_FONT_BIN2X12( 000000000000 ,\ 000000000000 ), DISP_FONT_BIN2X12( 000000000000 ,\ 000000000000 ), DISP_FONT_BIN2X12( 000000000000 ,\ 000000000000 ), DISP_FONT_BIN2X12( 000000000000 ,\ 000000000000 ), DISP_FONT_BIN2X12( 000000000000 ,\ 000000000000 ), // Code 0x21 - '!' DISP_FONT_BIN2X12( 000000000000 ,\ 000011000000 ), DISP_FONT_BIN2X12( 000011000000 ,\ 000111100000 ), DISP_FONT_BIN2X12( 000111100000 ,\ 000111100000 ), DISP_FONT_BIN2X12( 000111100000 ,\ 000011000000 ), DISP_FONT_BIN2X12( 000011000000 ,\ 000011000000 ), DISP_FONT_BIN2X12( 000000000000 ,\ 000000000000 ), DISP_FONT_BIN2X12( 000011000000 ,\ 000011000000 ), DISP_FONT_BIN2X12( 000000000000 ,\ 000000000000 ), // Code 0x22 - '"' DISP_FONT_BIN2X12( 000000000000 ,\ 000000000000 ), DISP_FONT_BIN2X12( 000110011000 ,\ 000110011000 ), DISP_FONT_BIN2X12( 000110011000 ,\ 000110011000 ), DISP_FONT_BIN2X12( 000100010000 ,\ 000000000000 ), DISP_FONT_BIN2X12( 000000000000 ,\ 000000000000 ), DISP_FONT_BIN2X12( 000000000000 ,\ 000000000000 ), DISP_FONT_BIN2X12( 000000000000 ,\ 000000000000 ), DISP_FONT_BIN2X12( 000000000000 ,\ 000000000000 ), // Code 0x23 - '#' DISP_FONT_BIN2X12( 000000000000 ,\ 000011001100 ), DISP_FONT_BIN2X12( 000011001100 ,\ 000011001100 ), DISP_FONT_BIN2X12( 001111111110 ,\ 001111111110 ), DISP_FONT_BIN2X12( 000110011000 ,\ 000110011000 ), DISP_FONT_BIN2X12( 000110011000 ,\ 011111111100 ), DISP_FONT_BIN2X12( 011111111100 ,\ 001100110000 ), DISP_FONT_BIN2X12( 001100110000 ,\ 001100110000 ), DISP_FONT_BIN2X12( 000000000000 ,\ 000000000000 ), // Code 0x24 - '$' DISP_FONT_BIN2X12( 000000000000 ,\ 000000100000 ), DISP_FONT_BIN2X12( 000001100000 ,\ 001111111000 ), DISP_FONT_BIN2X12( 001111111100 ,\ 011001100000 ), DISP_FONT_BIN2X12( 011001100000 ,\ 011111111000 ), DISP_FONT_BIN2X12( 000111111100 ,\ 000011001100 ), DISP_FONT_BIN2X12( 000011001100 ,\ 011111111100 ), DISP_FONT_BIN2X12( 001111111000 ,\ 000011000000 ), DISP_FONT_BIN2X12( 000010000000 ,\ 000000000000 ), // Code 0x25 - '%' DISP_FONT_BIN2X12( 000000000000 ,\ 001100000000 ), DISP_FONT_BIN2X12( 011100001100 ,\ 011000011100 ), DISP_FONT_BIN2X12( 000000111000 ,\ 000001110000 ), DISP_FONT_BIN2X12( 000001110000 ,\ 000011100000 ), DISP_FONT_BIN2X12( 000111000000 ,\ 000111000000 ), DISP_FONT_BIN2X12( 001110000000 ,\ 011100001100 ), DISP_FONT_BIN2X12( 011000011100 ,\ 000000011000 ), DISP_FONT_BIN2X12( 000000000000 ,\ 000000000000 ), // Code 0x26 - '&' DISP_FONT_BIN2X12( 000000000000 ,\ 000011100000 ), DISP_FONT_BIN2X12( 000111110000 ,\ 001100110000 ), DISP_FONT_BIN2X12( 001100110000 ,\ 001101100000 ), DISP_FONT_BIN2X12( 000111000000 ,\ 001111000000 ), DISP_FONT_BIN2X12( 011111000000 ,\ 011001101100 ), DISP_FONT_BIN2X12( 011001111000 ,\ 011000110000 ), DISP_FONT_BIN2X12( 011101111000 ,\ 001111001100 ), DISP_FONT_BIN2X12( 000000000000 ,\ 000000000000 ),
};
-
- солюшн от сеггера Nikolay801_(1907 знак., 25.08.2021 13:40)
- Neo: Do you always look at it encoded? Cipher: You get used to it.
I don’t even see the code. All I see is blonde, brunette, red-head.
Hey, you uh… want a drink? - SciFi(25.08.2021 12:54)
- Ну когда дринкнешь, тогда конечно лучше буковки видно :-) А рисовать фонты насухую даже в графредакторе утомительно :-) - il-2(25.08.2021 15:04)
- :)) - MBedder(25.08.2021 13:13)