1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-13 03:19:53 +03:00

[Horus] Bold font added

This commit is contained in:
Bertrand Songis 2016-03-24 21:41:43 +01:00
parent e3d70817ea
commit 31fa16bf87
15 changed files with 43 additions and 35 deletions

View file

@ -19,4 +19,5 @@ macro(add_truetype_font_target radio name font size bold)
COMMAND ${RADIO_DIRECTORY}/util/font2png.py ${font} ${size} ${bold} ${target}
WORKING_DIRECTORY ${RADIO_SRC_DIRECTORY}
)
set(ttf_horus_fonts_targets ${ttf_horus_fonts_targets} ttf_${radio}_${name})
endmacro(add_truetype_font_target)

View file

@ -1,10 +1,11 @@
add_truetype_font_target(horus tinsize "DejaVu Sans" 9 False)
add_truetype_font_target(horus smlsize "DejaVu Sans" 13 False)
add_truetype_font_target(horus stdsize "DejaVu Sans" 16 False)
add_truetype_font_target(horus stdsizebold "DejaVu Sans" 16 True)
add_truetype_font_target(horus midsize "DejaVu Sans" 24 False)
add_truetype_font_target(horus dblsize "DejaVu Sans" 32 True)
add_truetype_font_target(horus xxlsize "DejaVu Sans" 48 False)
add_custom_target(ttf_horus_fonts DEPENDS ttf_horus_tinsize ttf_horus_smlsize ttf_horus_stdsize ttf_horus_midsize ttf_horus_dblsize ttf_horus_xxlsize)
add_custom_target(ttf_horus_fonts DEPENDS ${ttf_horus_fonts_targets})
add_bitmaps_target(horus_bitmaps "${RADIO_SRC_DIRECTORY}/bitmaps/horus/bmp_*.png" 480 5/6/5)
add_bitmaps_target(horus_calibration_bitmaps "${RADIO_SRC_DIRECTORY}/bitmaps/horus/calibration/bmp_*.png" 480 5/6/5)

View file

@ -24,7 +24,7 @@
#if defined(COLORLCD)
extern const uint16_t * const fontspecsTable[16];
extern const pm_uchar * const fontsTable[16];
extern const uint8_t * const fontsTable[16];
#else

View file

@ -1 +1 @@
{ 0,4,14,28,54,76,110,139,146,160,173,193,217,228,242,251,266,289,310,331,352,375,397,420,441,464,487,497,508,532,556,580,598,613,641,665,689,715,736,757,783,808,818,832,859,880,910,935,963,987,1015,1040,1062,1087,1112,1140,1178,1206,1234,1258,1272,1287,1300,1324,1343,1356,1378,1401,1420,1443,1466,1484,1507,1529,1539,1553,1576,1586,1618,1640,1663,1686,1709,1726,1746,1764,1786,1810,1841,1865,1889,1909,1933,1936,1960,1988,2015,2033,2051,2074,2097,2120,2143,2171, 2171, 2171, 2171, 2171, 2171, 2171, 2171, 2171, 2171, 2171, 2171, 2171, 2171 }
0,4,14,28,54,76,110,139,146,160,173,193,217,228,242,251,266,289,310,331,352,375,397,420,441,464,487,497,508,532,556,580,598,613,641,665,689,715,736,757,783,808,818,832,859,880,910,935,963,987,1015,1040,1062,1087,1112,1140,1178,1206,1234,1258,1272,1287,1300,1324,1343,1356,1378,1401,1420,1443,1466,1484,1507,1529,1539,1553,1576,1586,1618,1640,1663,1686,1709,1726,1746,1764,1786,1810,1841,1865,1889,1909,1933,1936,1960,1988,2015,2033,2051,2074,2097,2120,2143,2171, 2171, 2171, 2171, 2171, 2171, 2171, 2171, 2171, 2171, 2171, 2171, 2171, 2171

View file

@ -1 +1 @@
{ 0,4,10,20,41,56,80,100,106,115,125,140,159,167,177,184,196,212,227,242,258,274,290,306,322,338,354,361,369,388,407,426,440,451,471,487,505,524,539,553,572,589,595,605,623,638,658,675,695,710,730,747,763,782,799,819,845,864,883,901,910,922,931,950,967,976,991,1006,1020,1036,1052,1064,1080,1095,1101,1110,1125,1131,1154,1169,1185,1200,1216,1227,1241,1253,1268,1285,1306,1323,1340,1354,1373,1376,1395,1416,1437,1452,1467,1484,1501,1518,1535,1557, 1557, 1557, 1557, 1557, 1557, 1557, 1557, 1557, 1557, 1557, 1557, 1557, 1557 }
0,4,10,20,41,56,80,100,106,115,125,140,159,167,177,184,196,212,227,242,258,274,290,306,322,338,354,361,369,388,407,426,440,451,471,487,505,524,539,553,572,589,595,605,623,638,658,675,695,710,730,747,763,782,799,819,845,864,883,901,910,922,931,950,967,976,991,1006,1020,1036,1052,1064,1080,1095,1101,1110,1125,1131,1154,1169,1185,1200,1216,1227,1241,1253,1268,1285,1306,1323,1340,1354,1373,1376,1395,1416,1437,1452,1467,1484,1501,1518,1535,1557, 1557, 1557, 1557, 1557, 1557, 1557, 1557, 1557, 1557, 1557, 1557, 1557, 1557

View file

@ -1 +1 @@
{ 0,4,8,13,23,31,44,55,58,63,67,75,85,88,94,97,103,112,120,128,137,146,154,163,171,180,189,192,195,205,215,225,232,238,248,256,266,276,284,291,301,310,313,318,327,335,345,354,365,373,384,393,402,412,421,431,445,455,465,475,479,485,489,499,508,513,521,529,537,546,555,561,570,578,581,586,594,597,609,617,626,634,643,649,657,663,671,680,692,701,710,718,728,729,739,751,763,771,779,789,799,809,819,830, 830, 830, 830, 830, 830, 830, 830, 830, 830, 830, 830, 830, 830 }
0,4,8,13,23,31,44,55,58,63,67,75,85,88,94,97,103,112,120,128,137,146,154,163,171,180,189,192,195,205,215,225,232,238,248,256,266,276,284,291,301,310,313,318,327,335,345,354,365,373,384,393,402,412,421,431,445,455,465,475,479,485,489,499,508,513,521,529,537,546,555,561,570,578,581,586,594,597,609,617,626,634,643,649,657,663,671,680,692,701,710,718,728,729,739,751,763,771,779,789,799,809,819,830, 830, 830, 830, 830, 830, 830, 830, 830, 830, 830, 830, 830, 830

View file

@ -1 +1 @@
{ 0,4,7,13,26,35,51,63,66,71,76,85,97,101,107,111,118,128,137,146,155,166,175,185,194,204,214,218,222,234,246,258,266,273,285,295,307,319,329,338,351,362,366,372,383,392,405,416,429,439,452,463,473,485,496,508,525,537,549,561,566,573,578,590,601,607,617,627,636,646,656,663,673,682,685,690,700,703,718,727,737,747,757,764,773,780,789,799,813,823,833,842,854,855,867,881,895,904,913,924,935,946,957,971, 986, 1001, 1016, 1031, 1046, 1061, 1076, 1091, 1106, 1121, 1136, 1151, 1166 }
0,4,7,13,26,35,51,63,66,71,76,85,97,101,107,111,118,128,137,146,155,166,175,185,194,204,214,218,222,234,246,258,266,273,285,295,307,319,329,338,351,362,366,372,383,392,405,416,429,439,452,463,473,485,496,508,525,537,549,561,566,573,578,590,601,607,617,627,636,646,656,663,673,682,685,690,700,703,718,727,737,747,757,764,773,780,789,799,813,823,833,842,854,855,867,881,895,904,913,924,935,946,957,971, 986, 1001, 1016, 1031, 1046, 1061, 1076, 1091, 1106, 1121, 1136, 1151, 1166

View file

@ -1 +1 @@
{ 0,4,7,12,20,26,36,44,47,51,55,61,69,72,76,79,84,91,97,103,109,116,122,129,135,142,149,151,154,162,170,178,184,189,197,204,211,219,226,232,240,247,250,254,262,268,276,283,291,298,306,313,320,328,335,343,353,360,368,375,379,384,388,396,403,407,413,420,426,432,439,444,450,456,459,463,470,473,482,488,495,502,508,513,519,524,530,537,545,552,559,565,573,574,582,591,600,606,612,619,626,633,640,648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648 }
0,4,7,12,20,26,36,44,47,51,55,61,69,72,76,79,84,91,97,103,109,116,122,129,135,142,149,151,154,162,170,178,184,189,197,204,211,219,226,232,240,247,250,254,262,268,276,283,291,298,306,313,320,328,335,343,353,360,368,375,379,384,388,396,403,407,413,420,426,432,439,444,450,456,459,463,470,473,482,488,495,502,508,513,519,524,530,537,545,552,559,565,573,574,582,591,600,606,612,619,626,633,640,648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648

View file

@ -1 +1 @@
{ 0,4,12,29,66,93,137,173,181,195,210,235,269,280,296,305,325,353,378,404,431,460,487,515,542,570,598,607,618,652,686,720,743,762,798,827,859,893,920,944,979,1010,1019,1035,1067,1093,1129,1160,1197,1224,1261,1292,1320,1354,1384,1420,1468,1502,1536,1568,1582,1602,1616,1650,1679,1695,1722,1749,1774,1802,1830,1850,1878,1904,1912,1925,1952,1960,2002,2028,2056,2083,2111,2130,2154,2174,2200,2229,2268,2297,2326,2351,2385,2388,2422,2461,2500,2525,2550,2581,2612,2643,2674,2714, 2714, 2714, 2714, 2714, 2714, 2714, 2714, 2714, 2714, 2714, 2714, 2714, 2714 }
0,4,12,29,66,93,137,173,181,195,210,235,269,280,296,305,325,353,378,404,431,460,487,515,542,570,598,607,618,652,686,720,743,762,798,827,859,893,920,944,979,1010,1019,1035,1067,1093,1129,1160,1197,1224,1261,1292,1320,1354,1384,1420,1468,1502,1536,1568,1582,1602,1616,1650,1679,1695,1722,1749,1774,1802,1830,1850,1878,1904,1912,1925,1952,1960,2002,2028,2056,2083,2111,2130,2154,2174,2200,2229,2268,2297,2326,2351,2385,2388,2422,2461,2500,2525,2550,2581,2612,2643,2674,2714, 2714, 2714, 2714, 2714, 2714, 2714, 2714, 2714, 2714, 2714, 2714, 2714, 2714

View file

@ -18,55 +18,63 @@
* GNU General Public License for more details.
*/
#include "../../opentx.h"
#include "opentx.h"
const uint16_t font_tinsize_specs[] PROGMEM =
uint16_t font_tinsize_specs[] = {
#include "font_tinsize.specs"
;
};
const pm_uchar font_tinsize[] PROGMEM = {
pm_uchar font_tinsize[] = {
#include "font_tinsize.lbm"
};
const uint16_t font_smlsize_specs[] PROGMEM =
uint16_t font_smlsize_specs[] = {
#include "font_smlsize.specs"
;
};
const pm_uchar font_smlsize[] PROGMEM = {
pm_uchar font_smlsize[] = {
#include "font_smlsize.lbm"
};
const uint16_t font_stdsize_specs[] PROGMEM =
uint16_t font_stdsize_specs[] = {
#include "font_stdsize.specs"
;
};
const pm_uchar font_stdsize[] PROGMEM = {
pm_uchar font_stdsize[] = {
#include "font_stdsize.lbm"
};
const uint16_t font_midsize_specs[] PROGMEM =
uint16_t font_midsize_specs[] = {
#include "font_midsize.specs"
;
};
const pm_uchar font_midsize[] PROGMEM = {
pm_uchar font_midsize[] = {
#include "font_midsize.lbm"
};
const uint16_t font_dblsize_specs[] PROGMEM =
uint16_t font_dblsize_specs[] = {
#include "font_dblsize.specs"
;
};
const pm_uchar font_dblsize[] PROGMEM = {
pm_uchar font_dblsize[] = {
#include "font_dblsize.lbm"
};
const uint16_t font_xxlsize_specs[] PROGMEM =
uint16_t font_xxlsize_specs[] = {
#include "font_xxlsize.specs"
;
};
const pm_uchar font_xxlsize[] PROGMEM = {
pm_uchar font_xxlsize[] = {
#include "font_xxlsize.lbm"
};
const uint16_t * const fontspecsTable[16] = { font_stdsize_specs, font_tinsize_specs, font_smlsize_specs, font_midsize_specs, font_dblsize_specs, font_xxlsize_specs };
const pm_uchar * const fontsTable[16] = { font_stdsize, font_tinsize, font_smlsize, font_midsize, font_dblsize, font_xxlsize };
uint16_t font_stdsizebold_specs[] = {
#include "font_stdsizebold.specs"
};
pm_uchar font_stdsizebold[] = {
#include "font_stdsizebold.lbm"
};
const uint16_t * const fontspecsTable[16] = { font_stdsize_specs, font_tinsize_specs, font_smlsize_specs, font_midsize_specs, font_dblsize_specs, font_xxlsize_specs, font_stdsizebold_specs };
const uint8_t * const fontsTable[16] = { font_stdsize, font_tinsize, font_smlsize, font_midsize, font_dblsize, font_xxlsize, font_stdsizebold };

View file

@ -38,7 +38,6 @@
#define lcdint_t int32_t
#define BSS 0x00
#define BOLD 0x00
/* lcd common flags */
#define BLINK 0x01
@ -69,6 +68,7 @@
#define MIDSIZE 0x0300
#define DBLSIZE 0x0400
#define XXLSIZE 0x0500
#define BOLD 0x0600
#define VERTICAL 0x0800
#define TIMEBLINK 0x1000

View file

@ -127,7 +127,7 @@ bool menuModelFlightModesAll(evt_t event)
FlightModeData *p = flightModeAddress(k);
putsFlightMode(MENUS_MARGIN_LEFT, y, k+1, (getFlightMode()==k ? 0/*BOLD*/ : 0) | ((sub==k && menuHorizontalPosition<0) ? INVERS : 0));
putsFlightMode(MENUS_MARGIN_LEFT, y, k+1, (getFlightMode()==k ? BOLD : 0) | ((sub==k && menuHorizontalPosition<0) ? INVERS : 0));
for (int j=0; j<ITEM_FLIGHT_MODES_COUNT; j++) {
LcdFlags attr = ((sub==k && posHorz==j) ? ((s_editMode>0) ? BLINK|INVERS : INVERS) : 0);

View file

@ -109,7 +109,7 @@ bool menuModelLogicalSwitches(evt_t event)
// CSW name
unsigned int sw = SWSRC_SW1+k;
putsSwitches(MENUS_MARGIN_LEFT, y, sw, (getSwitch(sw) ? 0/*BOLD*/ : 0) | ((sub==k && CURSOR_ON_LINE()) ? INVERS : 0));
putsSwitches(MENUS_MARGIN_LEFT, y, sw, (getSwitch(sw) ? BOLD : 0) | ((sub==k && CURSOR_ON_LINE()) ? INVERS : 0));
// CSW func
lcdDrawTextAtIndex(CSW_1ST_COLUMN, y, STR_VCSWFUNC, cs->func, horz==0 ? attr : 0);

View file

@ -162,7 +162,7 @@ enum MixFields {
MIX_FIELD_COUNT
};
void gvarWeightItem(coord_t x, coord_t y, MixData *md, uint8_t attr, evt_t event)
void gvarWeightItem(coord_t x, coord_t y, MixData *md, LcdFlags attr, evt_t event)
{
u_int8int16_t weight;
MD_WEIGHT_TO_UNION(md, weight);

View file

@ -89,11 +89,9 @@ def createFontBitmap(filename, fontname, fontsize, fontbold, foreground, backgro
image.save(filename + ".png")
if coordsfile:
with open(filename + ".specs", "w") as f:
f.write("{ ")
f.write(",".join(str(tmp) for tmp in coords))
for i in range(1, 14):
f.write(", %d" % (int(coords[-1]) + i * (extraWidth / 12)))
f.write(" }")
return coords
if __name__ == "__main__":