mirror of
https://github.com/opentx/opentx.git
synced 2025-07-19 06:15:10 +03:00
BOLD FONT
added Bold font definitions MIXER: active mix weight is BOLDed instead of source, because we now have no international Bold definitions. Bolded numbers are wider than before, but it seems it can fit.
This commit is contained in:
parent
bddfa3938a
commit
4a6acab3c9
8 changed files with 48 additions and 27 deletions
|
@ -1,4 +1,4 @@
|
|||
0x00,0x00,0xff,0xff,0xff,0xff,0xff,0x6f,0xff,0xff,0xff,0x07,0x00,0x07,0xff,0x18,0x30,0x18,0x0c,0x06,0x08,0x7f,0x7f,0x7f,0x08,0x23,0x13,0x08,0x64,0x62,0x36,0x49,0x55,0x22,0x50,0xff,0x05,0x03,0xff,0xff,0xff,0x1c,0x22,0x41,0xff,0xff,0x41,0x22,0x1c,0xff,0x14,0x08,0x3e,0x08,0x14,0x08,0x08,0x3e,0x08,0x08,0xff,0x50,0x30,0xff,0xff,0x00,0x08,0x08,0x08,0x08,0xff,0xff,0x40,0xff,0xff,0x20,0x10,0x08,0x04,0x02,
|
||||
0x00,0x00,0xff,0xff,0xff,0xff,0xff,0x6f,0xff,0xff,0xff,0x07,0x00,0x07,0xff,0x18,0x30,0x18,0x0c,0x06,0x08,0x7f,0x7f,0x7f,0x08,0x23,0x13,0x08,0x64,0x62,0x36,0x49,0x55,0x22,0x50,0xff,0x05,0x03,0xff,0xff,0xff,0x1c,0x22,0x41,0xff,0xff,0x41,0x22,0x1c,0xff,0x14,0x08,0x3e,0x08,0x14,0x08,0x08,0x3e,0x08,0x08,0xff,0x50,0x30,0xff,0xff,0x00,0x08,0x08,0x08,0xff,0xff,0xff,0x40,0xff,0xff,0x20,0x10,0x08,0x04,0x02,
|
||||
0x3e,0x41,0x41,0x3e,0xff,0x00,0x42,0x7f,0x40,0xff,0x62,0x51,0x49,0x46,0xff,0x41,0x49,0x49,0x36,0xff,0x18,0x14,0x12,0x7f,0xff,0x27,0x45,0x45,0x39,0xff,0x3e,0x49,0x49,0x32,0xff,0x01,0x79,0x05,0x03,0xff,0x36,0x49,0x49,0x36,0xff,0x06,0x49,0x29,0x1e,0xff,0xff,0x36,0x36,0xff,0xff,0xff,0x56,0x36,0xff,0xff,0xff,0x08,0x14,0x22,0x41,0x14,0x14,0x14,0x14,0x14,0x41,0x22,0x14,0x08,0xff,0x02,0x01,0x51,0x09,0x06,
|
||||
0x06,0x09,0x09,0x06,0xff,0x7e,0x09,0x09,0x09,0x7e,0x7f,0x49,0x49,0x49,0x36,0x3e,0x41,0x41,0x41,0x22,0x7f,0x41,0x41,0x22,0x1c,0x7f,0x49,0x49,0x49,0x41,0x7f,0x09,0x09,0x09,0x01,0x3e,0x41,0x49,0x49,0x7a,0x7f,0x08,0x08,0x08,0x7f,0xff,0x41,0x7f,0x41,0xff,0x20,0x40,0x41,0x3f,0x01,0x7f,0x08,0x14,0x22,0x41,0x7f,0x40,0x40,0x40,0xff,0x7f,0x02,0x0c,0x02,0x7f,0x7f,0x04,0x08,0x10,0x7f,0x3e,0x41,0x41,0x41,0x3e,
|
||||
0x7f,0x09,0x09,0x09,0x06,0x3e,0x41,0x51,0x21,0x5e,0x7f,0x09,0x19,0x29,0x46,0x26,0x49,0x49,0x49,0x32,0x01,0x01,0x7f,0x01,0x01,0x3f,0x40,0x40,0x40,0x3f,0x1f,0x20,0x40,0x20,0x1f,0x3f,0x40,0x30,0x40,0x3f,0x63,0x14,0x08,0x14,0x63,0x07,0x08,0x70,0x08,0x07,0x61,0x51,0x49,0x45,0x43,0x7f,0x41,0x41,0x00,0xff,0x02,0x04,0x08,0x10,0x20,0x00,0x41,0x41,0x7f,0xff,0x04,0x02,0x01,0x02,0x04,0x40,0x40,0x40,0x40,0xff,
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 636 B After Width: | Height: | Size: 623 B |
1
radio/src/fonts/std/font_05x07_B_compressed.lbm
Normal file
1
radio/src/fonts/std/font_05x07_B_compressed.lbm
Normal file
|
@ -0,0 +1 @@
|
|||
0x00,0x00,0x00,0xff,0xff,0xff,0x80,0xe0,0x60,0xff,0x00,0x18,0x18,0x18,0xff,0xff,0x60,0x60,0xff,0xff,0x60,0x60,0x60,0x60,0xff,0x3e,0x7f,0x41,0x7f,0x3e,0x00,0x42,0x7f,0x7f,0x40,0x62,0x73,0x59,0x4f,0x46,0x41,0x49,0x7f,0x7f,0x36,0x18,0x1c,0x12,0x7f,0x7f,0x27,0x67,0x45,0x7d,0x39,0x3e,0x7f,0x49,0x7b,0x32,0x01,0x79,0x7d,0x07,0x03,0x36,0x7f,0x49,0x7f,0x36,0x06,0x4f,0x69,0x3f,0x1e,0xff,0x36,0x36,0xff,0xff,0x7e,0x7f,0x09,0x7f,0x7e,0x7f,0x7f,0x49,0x7f,0x36,0x3e,0x7f,0x41,0x77,0x36,0x7f,0x7f,0x41,0x3e,0x1c,0x7f,0x7f,0x49,0x49,0x41,0x7f,0x7f,0x09,0x09,0x01,0x3e,0x7f,0x41,0x59,0x7a,0x7f,0x7f,0x08,0x7f,0x7f,0x41,0x7f,0x7f,0x41,0xff,0x30,0x70,0x41,0x7f,0x3f,0x7f,0x7f,0x14,0x63,0x41,0x7f,0x7f,0x40,0x40,0xff,0x7f,0x07,0x1e,0x07,0x7f,0x7f,0x7f,0x0c,0x18,0x7f,0x3e,0x7f,0x41,0x7f,0x3e,0x7f,0x7f,0x09,0x0f,0x06,0x3e,0x7f,0x41,0x2f,0x5e,0x7f,0x7f,0x19,0x6f,0x46,0x26,0x4f,0x5d,0x79,0x32,0x01,0x7f,0x7f,0x01,0xff,0x3f,0x7f,0x60,0x7f,0x3f,0x1f,0x3f,0x60,0x3f,0x1f,0x3f,0x70,0x38,0x70,0x3f,0x63,0x77,0x1c,0x77,0x63,0x07,0x1f,0x78,0x1f,0x07,0x71,0x79,0x5d,0x4f,0x47,0x20,0x74,0x54,0x7c,0x78,0x7f,0x7f,0x44,0x7c,0x38,0x38,0x7c,0x44,0x44,0x20,0x38,0x7c,0x44,0x7f,0x7f,0x38,0x7c,0x54,0x5c,0x18,0x08,0x7e,0x7f,0x09,0x02,0x0c,0x5e,0x52,0x7e,0x3e,0x7f,0x7f,0x04,0x7c,0x78,0x44,0x7d,0x7d,0x40,0xff,0x30,0x70,0x44,0x7d,0x3d,0x7f,0x7f,0x28,0x44,0xff,0x41,0x7f,0x7f,0x40,0xff,0x7c,0x1c,0x38,0x1c,0x78,0x7c,0x78,0x0c,0x7c,0x78,0x38,0x7c,0x44,0x7c,0x38,0x7c,0x7c,0x24,0x3c,0x18,0x18,0x3c,0x24,0x7c,0x7c,0x7c,0x78,0x0c,0x1c,0x18,0x48,0x5c,0x7c,0x74,0x20,0x04,0x3f,0x7f,0x44,0x20,0x3c,0x7c,0x60,0x3c,0x7c,0x1c,0x3c,0x60,0x3c,0x1c,0x3c,0x70,0x38,0x70,0x3c,0x44,0x6c,0x38,0x6c,0x44,0x0c,0x5c,0x50,0x7c,0x3c,0x44,0x64,0x74,0x5c,0x4c,
|
BIN
radio/src/fonts/std/font_05x07_B_compressed.png
Normal file
BIN
radio/src/fonts/std/font_05x07_B_compressed.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 436 B |
|
@ -3559,9 +3559,9 @@ void menuModelExpoMix(uint8_t expo, uint8_t event)
|
|||
|
||||
if (mixCnt > 0) lcd_putsiAtt(FW, y, STR_VMLTPX2, md->mltpx, 0);
|
||||
|
||||
putsMixerSource(MIX_LINE_SRC_POS, y, md->srcRaw, isMixActive(i) ? BOLD : 0);
|
||||
putsMixerSource(MIX_LINE_SRC_POS, y, md->srcRaw, 0);
|
||||
|
||||
gvarWeightItem(MIX_LINE_WEIGHT_POS, y, md, attr, event);
|
||||
gvarWeightItem(MIX_LINE_WEIGHT_POS, y, md, attr | (isMixActive(i) ? BOLD : 0), event);
|
||||
|
||||
#if LCD_W >= 212
|
||||
displayFlightModes(EXPO_LINE_FM_POS, y, md->phases);
|
||||
|
|
|
@ -113,10 +113,14 @@ void lcd_putcAtt(xcoord_t x, uint8_t y, const unsigned char c, LcdFlags flags)
|
|||
inv = true;
|
||||
}
|
||||
|
||||
unsigned char c_remapped;
|
||||
#if defined(BOLD_FONT) && !defined(CPUM64) || defined(EXTSTD)
|
||||
if (flags & (DBLSIZE+BOLD)) {
|
||||
#else
|
||||
if (flags & DBLSIZE) {
|
||||
// To save space only some DBLSIZE chars are available
|
||||
#endif
|
||||
// To save space only some DBLSIZE and BOLD chars are available
|
||||
// c has to be remapped. All non existing chars mapped to 0 (space)
|
||||
unsigned char c_remapped;
|
||||
|
||||
if (c>=',' && c<=':')
|
||||
c_remapped = c - ',' + 1;
|
||||
|
@ -126,13 +130,24 @@ void lcd_putcAtt(xcoord_t x, uint8_t y, const unsigned char c, LcdFlags flags)
|
|||
c_remapped = c - 'a' + 42;
|
||||
else if (c=='_')
|
||||
c_remapped = 4;
|
||||
#if defined(CPUARM)
|
||||
else if (c>= 128)
|
||||
#if defined(BOLD_FONT) && !defined(CPUM64) || defined(EXTSTD)
|
||||
else if (c==' ')
|
||||
c_remapped = 0;
|
||||
else if (flags & BOLD)
|
||||
flags &= ~BOLD;
|
||||
#endif
|
||||
#if defined(CPUARM)
|
||||
else if ((c>= 128) && (flags & DBLSIZE))
|
||||
c_remapped = c - 60;
|
||||
#endif
|
||||
#endif
|
||||
else
|
||||
c_remapped = 0;
|
||||
|
||||
#if defined(BOLD_FONT) && !defined(CPUM64) || defined(EXTSTD)
|
||||
}
|
||||
if (flags & DBLSIZE) {
|
||||
#endif
|
||||
|
||||
/* each letter consists of ten top bytes followed by
|
||||
* by ten bottom bytes (20 bytes per * char) */
|
||||
q = &font_10x14[((uint16_t)c_remapped)*20];
|
||||
|
@ -264,23 +279,18 @@ void lcd_putcAtt(xcoord_t x, uint8_t y, const unsigned char c, LcdFlags flags)
|
|||
else {
|
||||
|
||||
uint8_t ym8 = (y & 0x07);
|
||||
#if defined(BOLD_FONT)
|
||||
#if !defined(CPUM64) || defined(EXTSTD)
|
||||
uint8_t skipcol = 7;
|
||||
if ( c >= 'A') skipcol = 4;
|
||||
if ( c == 'T') skipcol = 5;
|
||||
#endif
|
||||
#if defined(BOLD_FONT) && defined(CPUM64) && !defined(EXTSTD)
|
||||
uint8_t bb = 0;
|
||||
if (inv) bb = 0xff;
|
||||
#endif
|
||||
#if !defined(CPUM64) || defined(EXTSTD)
|
||||
for (int8_t i=0; i<=7; i++) {
|
||||
#else
|
||||
for (int8_t i=0; i<=6; i++) {
|
||||
if (flags & BOLD) {
|
||||
q = &font_5x7_B[(c_remapped)*5];
|
||||
}
|
||||
#endif
|
||||
for (int8_t i=0; i<=6; i++) {
|
||||
uint8_t b = 0;
|
||||
if ( !i ) {
|
||||
if ( !x || !inv || (flags & BOLD)) {
|
||||
if ( !x || !inv ) {
|
||||
lcdNextPos++;
|
||||
p++;
|
||||
continue;
|
||||
|
@ -292,15 +302,12 @@ void lcd_putcAtt(xcoord_t x, uint8_t y, const unsigned char c, LcdFlags flags)
|
|||
else continue;
|
||||
}
|
||||
if (inv) b = ~b;
|
||||
#if !defined(CPUM64) || defined(EXTSTD)
|
||||
if (!(flags & BOLD) && (i == 7)) continue;
|
||||
#endif
|
||||
if ((flags & CONDENSED) && i==2) {
|
||||
/*condense the letter by skipping column 3 */
|
||||
continue;
|
||||
}
|
||||
|
||||
#if defined(BOLD_FONT)
|
||||
#if defined(BOLD_FONT) && defined(CPUM64) && !defined(EXTSTD)
|
||||
if (flags & BOLD) {
|
||||
uint8_t a;
|
||||
if (inv)
|
||||
|
@ -309,9 +316,6 @@ void lcd_putcAtt(xcoord_t x, uint8_t y, const unsigned char c, LcdFlags flags)
|
|||
a = b | bb;
|
||||
bb = b;
|
||||
b = a;
|
||||
#if !defined(CPUM64) || defined(EXTSTD)
|
||||
if (i == skipcol) continue;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -509,6 +513,10 @@ void lcd_outdezNAtt(xcoord_t x, uint8_t y, lcdint_t val, LcdFlags flags, uint8_t
|
|||
if (mode > 0)
|
||||
x += 2;
|
||||
}
|
||||
#if defined(BOLD_FONT) && !defined(CPUM64) || defined(EXTSTD)
|
||||
///////////////////////////////////////////////////////////////////
|
||||
if (flags & BOLD) fw += 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (flags & LEFT) {
|
||||
|
@ -566,6 +574,10 @@ void lcd_outdezNAtt(xcoord_t x, uint8_t y, lcdint_t val, LcdFlags flags, uint8_t
|
|||
#endif
|
||||
val = qr.quot;
|
||||
x-=fw;
|
||||
#if defined(BOLD_FONT) && !defined(CPUM64) || defined(EXTSTD)
|
||||
////////////////////////////////////////////////////////////
|
||||
if (i==len && (flags & BOLD)) x += 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (xn) {
|
||||
|
@ -583,7 +595,6 @@ void lcd_outdezNAtt(xcoord_t x, uint8_t y, lcdint_t val, LcdFlags flags, uint8_t
|
|||
lcd_hline(xn, y+2*FH-2, ln);
|
||||
}
|
||||
}
|
||||
x--;
|
||||
if (neg) lcd_putcAtt(x, y, '-', flags);
|
||||
}
|
||||
|
||||
|
|
|
@ -586,6 +586,12 @@ const pm_uchar font_5x7[] PROGMEM = {
|
|||
#endif
|
||||
};
|
||||
|
||||
#if !defined(CPUM64) || defined(EXTSTD)
|
||||
const pm_uchar font_5x7_B[] PROGMEM = {
|
||||
#include "font_05x07_B_compressed.lbm"
|
||||
};
|
||||
#endif
|
||||
|
||||
const pm_uchar font_10x14[] PROGMEM = {
|
||||
#include "font_10x14_compressed.lbm"
|
||||
#if defined(CPUARM)
|
||||
|
|
|
@ -536,6 +536,9 @@ extern const pm_char STR_RESET_BTN[];
|
|||
|
||||
extern const pm_uchar font_5x7[];
|
||||
extern const pm_uchar font_10x14[];
|
||||
#if !defined(CPUM64) || defined(EXTSTD)
|
||||
extern const pm_uchar font_5x7_B[];
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
extern const pm_uchar font_3x5[];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue