Generate font bitmaps without Qt (using Python Pillow) (#5891)
* Generate font bitmaps without Qt (using Python Pillow) * Roboto font now default
|
@ -14,10 +14,10 @@ macro(add_bitmaps_target targetname filter width format)
|
||||||
add_custom_target(${targetname} DEPENDS ${bitmaps_files})
|
add_custom_target(${targetname} DEPENDS ${bitmaps_files})
|
||||||
endmacro(add_bitmaps_target)
|
endmacro(add_bitmaps_target)
|
||||||
|
|
||||||
macro(add_truetype_font_target radio name font size bold)
|
macro(add_truetype_font_target radio name font size offset)
|
||||||
set(target ${RADIO_SRC_DIRECTORY}/fonts/${radio}/font_${name})
|
set(target ${RADIO_SRC_DIRECTORY}/fonts/${radio}/font_${name})
|
||||||
add_custom_target(ttf_${radio}_${name}
|
add_custom_target(ttf_${radio}_${name}
|
||||||
COMMAND ${PYTHON_EXECUTABLE} ${RADIO_DIRECTORY}/util/font2png.py ${font} ${size} ${bold} ${target}
|
COMMAND ${PYTHON_EXECUTABLE} ${RADIO_DIRECTORY}/util/font2png.py ${font} ${size} ${offset} ${target}
|
||||||
WORKING_DIRECTORY ${RADIO_SRC_DIRECTORY}
|
WORKING_DIRECTORY ${RADIO_SRC_DIRECTORY}
|
||||||
)
|
)
|
||||||
set(ttf_${radio}_fonts_targets ${ttf_${radio}_fonts_targets} ttf_${radio}_${name})
|
set(ttf_${radio}_fonts_targets ${ttf_${radio}_fonts_targets} ttf_${radio}_${name})
|
||||||
|
|
|
@ -1,11 +1,21 @@
|
||||||
set(FONT "DejaVu Sans")
|
set(FONT "Roboto/Roboto-Regular")
|
||||||
|
set(FONT_BOLD "Roboto/Roboto-Bold")
|
||||||
|
set(FONT_OFFSET 1)
|
||||||
|
|
||||||
add_truetype_font_target(480x272 tinsize ${FONT} 9 False)
|
#set(FONT "Kanit/Kanit-Regular")
|
||||||
add_truetype_font_target(480x272 smlsize ${FONT} 13 False)
|
#set(FONT_BOLD "Kanit/Kanit-Bold")
|
||||||
add_truetype_font_target(480x272 stdsize ${FONT} 16 False)
|
#set(FONT_OFFSET -2)
|
||||||
add_truetype_font_target(480x272 stdsizebold ${FONT} 16 True)
|
|
||||||
add_truetype_font_target(480x272 midsize ${FONT} 24 False)
|
#set(FONT "Ubuntu/Ubuntu-Regular")
|
||||||
add_truetype_font_target(480x272 dblsize ${FONT} 32 True)
|
#set(FONT_BOLD "Ubuntu/Ubuntu-Bold")
|
||||||
add_truetype_font_target(480x272 xxlsize ${FONT} 64 True)
|
#set(FONT_OFFSET 1)
|
||||||
|
|
||||||
|
add_truetype_font_target(480x272 tinsize ${FONT} 9 ${FONT_OFFSET})
|
||||||
|
add_truetype_font_target(480x272 smlsize ${FONT} 13 ${FONT_OFFSET})
|
||||||
|
add_truetype_font_target(480x272 stdsize ${FONT} 16 ${FONT_OFFSET})
|
||||||
|
add_truetype_font_target(480x272 stdsizebold ${FONT_BOLD} 16 ${FONT_OFFSET})
|
||||||
|
add_truetype_font_target(480x272 midsize ${FONT} 24 ${FONT_OFFSET})
|
||||||
|
add_truetype_font_target(480x272 dblsize ${FONT_BOLD} 32 ${FONT_OFFSET})
|
||||||
|
add_truetype_font_target(480x272 xxlsize ${FONT_BOLD} 64 ${FONT_OFFSET})
|
||||||
|
|
||||||
add_custom_target(ttf_horus_fonts DEPENDS ${ttf_480x272_fonts_targets})
|
add_custom_target(ttf_horus_fonts DEPENDS ${ttf_480x272_fonts_targets})
|
||||||
|
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 32 KiB |
|
@ -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,1940,1964,1992,2019,2037,2055,2078,2101,2124,2147,2175,2175,2175,2175,2175,2175,2175,2175,2175,2175,2175,2175,2175,2198,2221,2243,2258,2277,2305,2327,2355,2378,2403,2425,2448,2471,2491,2510,2527,2547,2571,2593,2607,2630,2652,2675,2697,2719,2750,2770,2791,2813,2837,2862,2886,2914,2942,2955,2976,3001,3029,3054,3079,3105,3130
|
0,4,14,25,45,64,89,111,117,129,141,157,175,184,197,207,220,239,258,277,296,315,334,353,372,391,410,420,429,446,465,483,500,513,536,557,579,601,620,639,662,686,696,715,737,755,784,808,831,853,876,897,918,939,961,983,1012,1033,1054,1074,1084,1100,1110,1125,1141,1153,1171,1190,1208,1227,1245,1258,1277,1296,1305,1314,1333,1342,1371,1390,1409,1428,1447,1460,1477,1489,1508,1525,1550,1568,1585,1602,1624,1633,1651,1664,1677,1690,1703,1716,1729,1742,1755,1768,1783,1798,1813,1828,1843,1858,1873,1888,1903,1918,1933,1948,1966,1984,2002,2014,2032,2055,2073,2096,2115,2137,2156,2177,2195,2212,2230,2244,2261,2278,2296,2308,2326,2345,2364,2383,2402,2426,2441,2460,2481,2503,2524,2544,2565,2588,2600,2619,2643,2666,2688,2710,2732,2753,2777,2796,2814,2832,2851,2874,2897,2920,2938,2957,2975,2993,3011,3022,3041,3060,3077,3094,3111,3134,3156,3175,3194,3218,3241,3262,3282,3302,3320,3338,3357,3380,3403,3426
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 24 KiB |
|
@ -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,1379,1398,1419,1440,1455,1470,1487,1504,1521,1538,1560,1560,1560,1560,1560,1560,1560,1560,1560,1560,1560,1560,1560,1576,1592,1607,1618,1632,1652,1667,1687,1703,1720,1735,1751,1767,1781,1795,1806,1820,1837,1852,1861,1877,1892,1908,1923,1938,1958,1971,1986,2002,2020,2037,2055,2074,2094,2102,2117,2134,2154,2171,2188,2207,2226
|
0,4,11,20,36,50,69,85,90,99,108,119,134,140,148,155,166,180,194,208,222,236,250,264,278,292,306,313,319,332,346,360,372,382,399,415,432,449,464,478,495,513,521,535,552,566,588,606,624,640,658,674,689,704,721,737,759,775,791,806,814,825,832,843,855,863,877,891,905,920,934,944,958,972,979,986,1000,1007,1029,1043,1058,1072,1087,1096,1109,1118,1132,1145,1164,1177,1189,1202,1219,1226,1240,1253,1266,1279,1292,1305,1318,1331,1344,1357,1372,1387,1402,1417,1432,1447,1462,1477,1492,1507,1522,1537,1551,1565,1579,1587,1601,1618,1632,1650,1665,1682,1696,1711,1725,1738,1752,1762,1775,1787,1801,1809,1823,1837,1852,1866,1880,1896,1906,1921,1936,1953,1969,1984,2000,2017,2026,2041,2059,2077,2094,2111,2128,2143,2161,2175,2189,2203,2218,2235,2252,2270,2284,2298,2312,2326,2340,2348,2362,2377,2390,2403,2416,2433,2450,2465,2479,2497,2515,2530,2545,2560,2574,2588,2603,2620,2637,2655
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 11 KiB |
|
@ -1 +1 @@
|
||||||
0,4,9,15,26,35,48,59,63,69,74,82,93,97,103,107,113,122,131,139,148,157,166,175,184,193,202,206,210,221,232,243,250,257,267,276,286,297,306,314,324,334,338,342,352,361,372,382,393,402,413,423,432,441,451,461,475,485,494,504,509,515,520,531,539,545,553,562,570,579,588,594,603,612,616,620,629,633,646,655,664,673,682,689,697,703,712,721,733,742,751,759,770,774,785,797,809,819,829,840,851,862,873,884,884,884,884,884,884,884,884,884,884,884,884,884,893,902,910,916,924,934,942,953,962,972,981,990,999,1007,1015,1022,1030,1039,1047,1053,1062,1071,1080,1089,1098,1109,1116,1125,1134,1144,1154,1164,1173,1183,1188,1197,1207,1218,1228,1238,1249,1258
|
0,4,8,13,22,30,41,51,54,60,66,73,81,85,90,94,100,108,116,124,132,141,149,157,165,173,181,185,189,197,205,213,220,226,236,245,254,264,272,280,290,300,305,313,323,331,343,353,363,372,382,391,400,409,418,427,440,449,458,467,472,479,483,489,496,501,509,517,525,533,541,547,555,563,567,571,579,583,595,603,611,619,627,633,641,646,654,661,672,680,687,695,705,709,717,730,743,756,769,782,795,808,821,834,849,864,879,894,909,924,939,954,969,984,999,1014,1022,1030,1038,1043,1051,1061,1069,1079,1087,1096,1104,1113,1121,1129,1137,1143,1151,1158,1166,1171,1179,1187,1195,1203,1211,1221,1228,1236,1245,1254,1263,1272,1281,1291,1296,1304,1314,1324,1333,1342,1352,1361,1371,1379,1387,1395,1403,1413,1423,1433,1441,1449,1457,1465,1473,1478,1486,1494,1502,1510,1518,1528,1537,1545,1553,1563,1573,1582,1591,1600,1608,1616,1624,1634,1644,1654
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 21 KiB |
|
@ -1 +1 @@
|
||||||
0,4,9,16,30,40,56,69,73,79,85,94,107,112,118,123,130,141,151,161,171,182,192,203,213,224,235,240,245,258,271,284,293,301,313,324,336,349,360,370,383,395,400,405,417,427,441,453,466,477,490,502,513,524,536,548,565,577,588,600,606,613,619,632,642,649,659,670,679,689,699,706,716,726,730,734,745,749,765,775,785,796,806,814,823,830,840,850,864,874,884,893,906,911,924,938,952,964,976,989,1002,1015,1028,1042,1057,1072,1087,1102,1117,1132,1147,1162,1177,1192,1207,1222,1232,1242,1252,1258,1267,1279,1289,1302,1312,1324,1334,1345,1355,1364,1373,1381,1390,1400,1410,1416,1426,1436,1446,1456,1466,1479,1486,1497,1508,1520,1532,1544,1555,1567,1572,1583,1595,1608,1620,1632,1645,1656
|
0,4,9,15,26,36,49,60,64,71,78,86,96,100,106,111,119,129,139,149,159,169,179,189,199,209,219,224,228,237,247,256,265,272,284,295,306,318,328,338,350,362,367,377,389,399,414,426,438,449,461,472,483,494,505,516,531,542,553,564,570,578,583,591,600,606,616,626,635,645,654,661,671,681,686,691,701,706,721,731,741,751,761,767,776,782,792,801,814,823,832,841,853,858,867,880,893,906,919,932,945,958,971,984,999,1014,1029,1044,1059,1074,1089,1104,1119,1134,1149,1164,1173,1182,1192,1198,1207,1219,1229,1241,1251,1262,1272,1283,1292,1301,1310,1317,1326,1335,1345,1351,1360,1370,1380,1390,1400,1412,1419,1429,1440,1451,1462,1473,1484,1496,1502,1512,1524,1536,1547,1558,1570,1581,1593,1603,1613,1623,1633,1645,1657,1669,1679,1689,1699,1708,1717,1723,1733,1743,1752,1761,1770,1782,1793,1803,1813,1825,1837,1848,1859,1870,1880,1890,1900,1912,1924,1936
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
@ -1 +1 @@
|
||||||
0,4,11,19,33,45,62,77,82,90,97,107,120,126,133,139,146,158,170,181,192,204,216,228,239,251,263,269,275,288,301,314,324,332,346,359,371,385,396,407,420,433,439,445,459,470,486,499,513,526,540,553,565,577,590,604,623,637,650,662,670,677,684,697,706,713,724,736,746,758,770,779,791,803,809,815,827,833,850,862,874,886,898,907,917,926,938,950,966,978,990,1000,1013,1018,1031,1045,1059,1071,1083,1096,1109,1122,1135,1149,1164,1179,1194,1209,1224,1239,1254,1269,1284,1299,1314,1329,1341,1353,1364,1371,1381,1395,1406,1420,1432,1445,1457,1469,1481,1491,1501,1510,1520,1532,1543,1551,1563,1575,1587,1599,1611,1626,1635,1646,1658,1670,1683,1695,1708,1722,1729,1740,1753,1767,1780,1793,1807,1819
|
0,4,9,15,26,36,49,61,65,72,79,88,98,103,110,116,123,133,143,153,163,173,183,193,203,213,223,229,234,243,253,262,271,278,290,301,312,323,333,343,355,367,373,383,395,405,420,432,444,455,467,478,489,500,512,524,539,550,561,572,578,587,592,600,609,615,625,635,644,654,664,671,681,691,696,701,711,716,731,741,751,761,771,778,787,793,803,812,825,835,844,853,864,869,878,891,904,917,930,943,956,969,982,995,1010,1025,1040,1055,1070,1085,1100,1115,1130,1145,1160,1175,1185,1195,1205,1211,1220,1232,1242,1254,1264,1276,1286,1297,1307,1316,1325,1332,1341,1350,1360,1366,1376,1386,1396,1406,1416,1428,1436,1446,1457,1468,1479,1490,1501,1513,1519,1529,1541,1553,1565,1577,1588,1599,1611,1621,1631,1641,1651,1663,1675,1687,1697,1707,1717,1726,1736,1742,1752,1762,1771,1780,1789,1801,1812,1822,1832,1844,1856,1867,1878,1889,1899,1909,1919,1931,1943,1955
|
Before Width: | Height: | Size: 9 KiB After Width: | Height: | Size: 8 KiB |
|
@ -1 +1 @@
|
||||||
0,4,8,13,21,27,37,45,48,52,56,62,70,73,77,80,85,92,98,104,110,117,123,130,136,143,150,153,156,164,172,180,186,191,199,206,213,221,228,234,242,249,252,255,263,269,277,284,292,299,307,314,321,328,335,343,353,360,367,374,378,383,387,395,401,405,411,418,424,430,437,442,448,454,457,460,467,470,479,485,492,499,505,510,516,521,527,534,542,549,556,562,570,573,581,590,599,606,613,621,629,637,645,653,653,653,653,653,653,653,653,653,653,653,653,653,660,667,673,677,683,691,697,705,712,719,725,732,739,745,751,756,762,769,775,779,786,792,799,805,811,819,824,831,838,845,852,859,866,874,878,885,892,900,907,914,922,929
|
0,4,7,11,18,24,32,39,42,46,50,55,61,64,68,71,76,82,88,94,100,106,112,118,124,130,136,139,142,148,154,160,165,169,176,183,190,197,203,209,216,223,226,232,239,245,254,261,268,275,282,289,295,302,309,316,325,332,339,346,350,355,358,363,369,373,379,385,391,397,403,408,414,420,423,426,432,435,444,450,456,462,468,472,478,482,488,493,501,507,513,519,526,529,535,548,561,574,587,600,613,626,639,652,667,682,697,712,727,742,757,772,787,802,817,832,838,844,850,854,860,867,873,880,886,893,899,905,911,917,923,928,934,940,946,950,956,962,968,974,980,987,992,998,1004,1011,1018,1025,1032,1039,1043,1049,1056,1063,1070,1077,1084,1091,1098,1104,1110,1116,1122,1129,1136,1143,1149,1155,1161,1167,1173,1177,1183,1189,1195,1201,1207,1214,1221,1227,1233,1240,1247,1253,1260,1267,1273,1279,1285,1292,1299,1306
|
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 72 KiB |
|
@ -1 +1 @@
|
||||||
0,4,20,45,94,133,197,251,262,285,307,342,386,404,428,443,470,512,549,586,625,668,708,750,789,830,871,886,904,948,992,1036,1068,1093,1146,1189,1232,1280,1318,1355,1403,1449,1465,1490,1540,1578,1634,1680,1732,1775,1827,1873,1914,1961,2006,2059,2130,2181,2232,2277,2300,2327,2350,2395,2430,2452,2492,2533,2568,2610,2652,2683,2725,2764,2779,2802,2844,2859,2919,2958,3001,3042,3084,3114,3150,3183,3222,3266,3324,3368,3412,3448,3492,3503,3547,3598,3648,3681,3714,3756,3798,3840,3882,3935,3935,3935,3935,3935,3935,3935,3935,3935,3935,3935,3935,3935,3977,4019,4059,4086,4121,4174,4214,4266,4309,4354,4393,4435,4477,4513,4549,4579,4615,4659,4699,4723,4765,4804,4847,4886,4925,4982,5018,5056,5097,5140,5186,5231,5282,5335,5355,5393,5439,5491,5536,5581,5629,5676
|
0,4,22,44,83,121,169,212,223,246,270,300,336,353,379,399,424,462,500,538,576,614,652,690,728,766,804,823,841,875,913,947,980,1006,1050,1092,1135,1178,1215,1251,1296,1342,1362,1399,1442,1478,1535,1581,1626,1668,1713,1755,1795,1836,1879,1922,1979,2021,2062,2102,2121,2151,2170,2199,2229,2251,2286,2323,2357,2394,2430,2454,2492,2529,2547,2565,2601,2619,2675,2712,2749,2786,2823,2847,2881,2904,2941,2974,3022,3056,3089,3123,3166,3183,3217,3230,3243,3256,3269,3282,3295,3308,3321,3334,3349,3364,3379,3394,3409,3424,3439,3454,3469,3484,3499,3514,3550,3586,3621,3643,3677,3721,3756,3801,3838,3881,3918,3959,3995,4029,4063,4090,4124,4157,4192,4214,4250,4287,4324,4361,4398,4443,4471,4508,4548,4591,4633,4673,4714,4758,4781,4818,4864,4909,4952,4995,5038,5079,5125,5162,5197,5232,5269,5313,5357,5402,5437,5474,5509,5543,5579,5600,5637,5674,5708,5742,5776,5820,5863,5900,5937,5983,6028,6068,6108,6148,6183,6218,6255,6299,6343,6388
|
BIN
radio/src/fonts/Kanit/Kanit-Black.ttf
Executable file
BIN
radio/src/fonts/Kanit/Kanit-BlackItalic.ttf
Executable file
BIN
radio/src/fonts/Kanit/Kanit-Bold.ttf
Executable file
BIN
radio/src/fonts/Kanit/Kanit-BoldItalic.ttf
Executable file
BIN
radio/src/fonts/Kanit/Kanit-ExtraBold.ttf
Executable file
BIN
radio/src/fonts/Kanit/Kanit-ExtraBoldItalic.ttf
Executable file
BIN
radio/src/fonts/Kanit/Kanit-ExtraLight.ttf
Executable file
BIN
radio/src/fonts/Kanit/Kanit-ExtraLightItalic.ttf
Executable file
BIN
radio/src/fonts/Kanit/Kanit-Italic.ttf
Executable file
BIN
radio/src/fonts/Kanit/Kanit-Light.ttf
Executable file
BIN
radio/src/fonts/Kanit/Kanit-LightItalic.ttf
Executable file
BIN
radio/src/fonts/Kanit/Kanit-Medium.ttf
Executable file
BIN
radio/src/fonts/Kanit/Kanit-MediumItalic.ttf
Executable file
BIN
radio/src/fonts/Kanit/Kanit-Regular.ttf
Executable file
BIN
radio/src/fonts/Kanit/Kanit-SemiBold.ttf
Executable file
BIN
radio/src/fonts/Kanit/Kanit-SemiBoldItalic.ttf
Executable file
BIN
radio/src/fonts/Kanit/Kanit-Thin.ttf
Executable file
BIN
radio/src/fonts/Kanit/Kanit-ThinItalic.ttf
Executable file
93
radio/src/fonts/Kanit/OFL.txt
Executable file
|
@ -0,0 +1,93 @@
|
||||||
|
Copyright (c) 2015, Cadson Demak (info@cadsondemak.com)
|
||||||
|
|
||||||
|
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||||
|
This license is copied below, and is also available with a FAQ at:
|
||||||
|
http://scripts.sil.org/OFL
|
||||||
|
|
||||||
|
|
||||||
|
-----------------------------------------------------------
|
||||||
|
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||||
|
-----------------------------------------------------------
|
||||||
|
|
||||||
|
PREAMBLE
|
||||||
|
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||||
|
development of collaborative font projects, to support the font creation
|
||||||
|
efforts of academic and linguistic communities, and to provide a free and
|
||||||
|
open framework in which fonts may be shared and improved in partnership
|
||||||
|
with others.
|
||||||
|
|
||||||
|
The OFL allows the licensed fonts to be used, studied, modified and
|
||||||
|
redistributed freely as long as they are not sold by themselves. The
|
||||||
|
fonts, including any derivative works, can be bundled, embedded,
|
||||||
|
redistributed and/or sold with any software provided that any reserved
|
||||||
|
names are not used by derivative works. The fonts and derivatives,
|
||||||
|
however, cannot be released under any other type of license. The
|
||||||
|
requirement for fonts to remain under this license does not apply
|
||||||
|
to any document created using the fonts or their derivatives.
|
||||||
|
|
||||||
|
DEFINITIONS
|
||||||
|
"Font Software" refers to the set of files released by the Copyright
|
||||||
|
Holder(s) under this license and clearly marked as such. This may
|
||||||
|
include source files, build scripts and documentation.
|
||||||
|
|
||||||
|
"Reserved Font Name" refers to any names specified as such after the
|
||||||
|
copyright statement(s).
|
||||||
|
|
||||||
|
"Original Version" refers to the collection of Font Software components as
|
||||||
|
distributed by the Copyright Holder(s).
|
||||||
|
|
||||||
|
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||||
|
or substituting -- in part or in whole -- any of the components of the
|
||||||
|
Original Version, by changing formats or by porting the Font Software to a
|
||||||
|
new environment.
|
||||||
|
|
||||||
|
"Author" refers to any designer, engineer, programmer, technical
|
||||||
|
writer or other person who contributed to the Font Software.
|
||||||
|
|
||||||
|
PERMISSION & CONDITIONS
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||||
|
redistribute, and sell modified and unmodified copies of the Font
|
||||||
|
Software, subject to the following conditions:
|
||||||
|
|
||||||
|
1) Neither the Font Software nor any of its individual components,
|
||||||
|
in Original or Modified Versions, may be sold by itself.
|
||||||
|
|
||||||
|
2) Original or Modified Versions of the Font Software may be bundled,
|
||||||
|
redistributed and/or sold with any software, provided that each copy
|
||||||
|
contains the above copyright notice and this license. These can be
|
||||||
|
included either as stand-alone text files, human-readable headers or
|
||||||
|
in the appropriate machine-readable metadata fields within text or
|
||||||
|
binary files as long as those fields can be easily viewed by the user.
|
||||||
|
|
||||||
|
3) No Modified Version of the Font Software may use the Reserved Font
|
||||||
|
Name(s) unless explicit written permission is granted by the corresponding
|
||||||
|
Copyright Holder. This restriction only applies to the primary font name as
|
||||||
|
presented to the users.
|
||||||
|
|
||||||
|
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||||
|
Software shall not be used to promote, endorse or advertise any
|
||||||
|
Modified Version, except to acknowledge the contribution(s) of the
|
||||||
|
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||||
|
permission.
|
||||||
|
|
||||||
|
5) The Font Software, modified or unmodified, in part or in whole,
|
||||||
|
must be distributed entirely under this license, and must not be
|
||||||
|
distributed under any other license. The requirement for fonts to
|
||||||
|
remain under this license does not apply to any document created
|
||||||
|
using the Font Software.
|
||||||
|
|
||||||
|
TERMINATION
|
||||||
|
This license becomes null and void if any of the above conditions are
|
||||||
|
not met.
|
||||||
|
|
||||||
|
DISCLAIMER
|
||||||
|
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||||
|
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||||
|
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||||
|
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||||
|
OTHER DEALINGS IN THE FONT SOFTWARE.
|
202
radio/src/fonts/Roboto/LICENSE.txt
Executable file
|
@ -0,0 +1,202 @@
|
||||||
|
|
||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright [yyyy] [name of copyright owner]
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
BIN
radio/src/fonts/Roboto/Roboto-Bold.ttf
Executable file
BIN
radio/src/fonts/Roboto/Roboto-Regular.ttf
Executable file
96
radio/src/fonts/Ubuntu/UFL.txt
Executable file
|
@ -0,0 +1,96 @@
|
||||||
|
-------------------------------
|
||||||
|
UBUNTU FONT LICENCE Version 1.0
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
PREAMBLE
|
||||||
|
This licence allows the licensed fonts to be used, studied, modified and
|
||||||
|
redistributed freely. The fonts, including any derivative works, can be
|
||||||
|
bundled, embedded, and redistributed provided the terms of this licence
|
||||||
|
are met. The fonts and derivatives, however, cannot be released under
|
||||||
|
any other licence. The requirement for fonts to remain under this
|
||||||
|
licence does not require any document created using the fonts or their
|
||||||
|
derivatives to be published under this licence, as long as the primary
|
||||||
|
purpose of the document is not to be a vehicle for the distribution of
|
||||||
|
the fonts.
|
||||||
|
|
||||||
|
DEFINITIONS
|
||||||
|
"Font Software" refers to the set of files released by the Copyright
|
||||||
|
Holder(s) under this licence and clearly marked as such. This may
|
||||||
|
include source files, build scripts and documentation.
|
||||||
|
|
||||||
|
"Original Version" refers to the collection of Font Software components
|
||||||
|
as received under this licence.
|
||||||
|
|
||||||
|
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||||
|
or substituting -- in part or in whole -- any of the components of the
|
||||||
|
Original Version, by changing formats or by porting the Font Software to
|
||||||
|
a new environment.
|
||||||
|
|
||||||
|
"Copyright Holder(s)" refers to all individuals and companies who have a
|
||||||
|
copyright ownership of the Font Software.
|
||||||
|
|
||||||
|
"Substantially Changed" refers to Modified Versions which can be easily
|
||||||
|
identified as dissimilar to the Font Software by users of the Font
|
||||||
|
Software comparing the Original Version with the Modified Version.
|
||||||
|
|
||||||
|
To "Propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification and with or without charging
|
||||||
|
a redistribution fee), making available to the public, and in some
|
||||||
|
countries other activities as well.
|
||||||
|
|
||||||
|
PERMISSION & CONDITIONS
|
||||||
|
This licence does not grant any rights under trademark law and all such
|
||||||
|
rights are reserved.
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
copy of the Font Software, to propagate the Font Software, subject to
|
||||||
|
the below conditions:
|
||||||
|
|
||||||
|
1) Each copy of the Font Software must contain the above copyright
|
||||||
|
notice and this licence. These can be included either as stand-alone
|
||||||
|
text files, human-readable headers or in the appropriate machine-
|
||||||
|
readable metadata fields within text or binary files as long as those
|
||||||
|
fields can be easily viewed by the user.
|
||||||
|
|
||||||
|
2) The font name complies with the following:
|
||||||
|
(a) The Original Version must retain its name, unmodified.
|
||||||
|
(b) Modified Versions which are Substantially Changed must be renamed to
|
||||||
|
avoid use of the name of the Original Version or similar names entirely.
|
||||||
|
(c) Modified Versions which are not Substantially Changed must be
|
||||||
|
renamed to both (i) retain the name of the Original Version and (ii) add
|
||||||
|
additional naming elements to distinguish the Modified Version from the
|
||||||
|
Original Version. The name of such Modified Versions must be the name of
|
||||||
|
the Original Version, with "derivative X" where X represents the name of
|
||||||
|
the new work, appended to that name.
|
||||||
|
|
||||||
|
3) The name(s) of the Copyright Holder(s) and any contributor to the
|
||||||
|
Font Software shall not be used to promote, endorse or advertise any
|
||||||
|
Modified Version, except (i) as required by this licence, (ii) to
|
||||||
|
acknowledge the contribution(s) of the Copyright Holder(s) or (iii) with
|
||||||
|
their explicit written permission.
|
||||||
|
|
||||||
|
4) The Font Software, modified or unmodified, in part or in whole, must
|
||||||
|
be distributed entirely under this licence, and must not be distributed
|
||||||
|
under any other licence. The requirement for fonts to remain under this
|
||||||
|
licence does not affect any document created using the Font Software,
|
||||||
|
except any version of the Font Software extracted from a document
|
||||||
|
created using the Font Software may only be distributed under this
|
||||||
|
licence.
|
||||||
|
|
||||||
|
TERMINATION
|
||||||
|
This licence becomes null and void if any of the above conditions are
|
||||||
|
not met.
|
||||||
|
|
||||||
|
DISCLAIMER
|
||||||
|
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||||
|
COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||||
|
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||||
|
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER
|
||||||
|
DEALINGS IN THE FONT SOFTWARE.
|
BIN
radio/src/fonts/Ubuntu/Ubuntu-Bold.ttf
Executable file
BIN
radio/src/fonts/Ubuntu/Ubuntu-BoldItalic.ttf
Executable file
BIN
radio/src/fonts/Ubuntu/Ubuntu-Italic.ttf
Executable file
BIN
radio/src/fonts/Ubuntu/Ubuntu-Light.ttf
Executable file
BIN
radio/src/fonts/Ubuntu/Ubuntu-LightItalic.ttf
Executable file
BIN
radio/src/fonts/Ubuntu/Ubuntu-Medium.ttf
Executable file
BIN
radio/src/fonts/Ubuntu/Ubuntu-MediumItalic.ttf
Executable file
BIN
radio/src/fonts/Ubuntu/Ubuntu-Regular.ttf
Executable file
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 5.2 KiB |
|
@ -37,7 +37,7 @@ uint8_t getMappedChar(uint8_t c)
|
||||||
if (c == 0)
|
if (c == 0)
|
||||||
result = 0;
|
result = 0;
|
||||||
#if defined(TRANSLATIONS_FR)
|
#if defined(TRANSLATIONS_FR)
|
||||||
else if (c >= 0x80 && c <= 0x85) {
|
else if (c >= 0x80 && c <= 0x84) {
|
||||||
result = 115 + c - 0x80;
|
result = 115 + c - 0x80;
|
||||||
}
|
}
|
||||||
#elif defined(TRANSLATIONS_DE)
|
#elif defined(TRANSLATIONS_DE)
|
||||||
|
@ -45,9 +45,33 @@ uint8_t getMappedChar(uint8_t c)
|
||||||
result = 120 + c - 0x80;
|
result = 120 + c - 0x80;
|
||||||
}
|
}
|
||||||
#elif defined(TRANSLATIONS_CZ)
|
#elif defined(TRANSLATIONS_CZ)
|
||||||
else if (c >= 0x80 && c < 0x80+30) {
|
else if (c >= 0x80 && c <= 0x80+29) {
|
||||||
result = 127 + c - 0x80;
|
result = 127 + c - 0x80;
|
||||||
}
|
}
|
||||||
|
#elif defined(TRANSLATIONS_ES)
|
||||||
|
else if (c >= 0x80 && c <= 0x81) {
|
||||||
|
result = 157 + c - 0x80;
|
||||||
|
}
|
||||||
|
#elif defined(TRANSLATIONS_FI)
|
||||||
|
else if (c >= 0x80 && c <= 0x85) {
|
||||||
|
result = 159 + c - 0x80;
|
||||||
|
}
|
||||||
|
#elif defined(TRANSLATIONS_IT)
|
||||||
|
else if (c >= 0x80 && c <= 0x81) {
|
||||||
|
result = 165 + c - 0x80;
|
||||||
|
}
|
||||||
|
#elif defined(TRANSLATIONS_PL)
|
||||||
|
else if (c >= 0x80 && c <= 0x80+17) {
|
||||||
|
result = 167 + c - 0x80;
|
||||||
|
}
|
||||||
|
#elif defined(TRANSLATIONS_PT)
|
||||||
|
else if (c >= 0x80 && c <= 0x80+21) {
|
||||||
|
result = 185 + c - 0x80;
|
||||||
|
}
|
||||||
|
#elif defined(TRANSLATIONS_SE)
|
||||||
|
else if (c >= 0x80 && c <= 0x85) {
|
||||||
|
result = 207 + c - 0x80;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
else if (c < 0xC0)
|
else if (c < 0xC0)
|
||||||
result = c - 0x20;
|
result = c - 0x20;
|
||||||
|
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 6 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 6 KiB After Width: | Height: | Size: 5.6 KiB |
|
@ -1,27 +1,11 @@
|
||||||
# An Debian image for compiling OpenTX 2.2
|
# An Debian image for compiling OpenTX 2.2
|
||||||
|
|
||||||
FROM debian:stretch
|
FROM debian:jessie
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN DEBIAN_FRONTEND=noninteractive apt-get -y update
|
||||||
apt-get install -y \
|
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential cmake gcc git lib32ncurses5 lib32z1 libfox-1.6-dev libsdl1.2-dev \
|
||||||
build-essential \
|
python-qt4 qt5-default qtmultimedia5-dev qttools5-dev qttools5-dev-tools libqt5svg5-dev \
|
||||||
cmake \
|
software-properties-common wget zip python-pip python-pil
|
||||||
gcc \
|
|
||||||
git \
|
|
||||||
lib32ncurses5 \
|
|
||||||
lib32z1 \
|
|
||||||
libfox-1.6-dev \
|
|
||||||
libsdl1.2-dev \
|
|
||||||
python-qt4 \
|
|
||||||
qt5-default \
|
|
||||||
qtmultimedia5-dev \
|
|
||||||
qttools5-dev \
|
|
||||||
qttools5-dev-tools \
|
|
||||||
libqt5svg5-dev \
|
|
||||||
software-properties-common \
|
|
||||||
wget \
|
|
||||||
zip \
|
|
||||||
python-pip
|
|
||||||
|
|
||||||
RUN python -m pip install filelock
|
RUN python -m pip install filelock
|
||||||
|
|
||||||
|
@ -38,5 +22,6 @@ RUN wget -q http://ftp.de.debian.org/debian/pool/main/g/gcc-avr/gcc-avr_4.7.2-2_
|
||||||
VOLUME ["/opentx"]
|
VOLUME ["/opentx"]
|
||||||
|
|
||||||
ENV PATH $PATH:/opt/gcc-arm-none-eabi/bin:/opentx/code/radio/util
|
ENV PATH $PATH:/opt/gcc-arm-none-eabi/bin:/opentx/code/radio/util
|
||||||
|
|
||||||
ARG OPENTX_VERSION_SUFFIX=
|
ARG OPENTX_VERSION_SUFFIX=
|
||||||
ENV OPENTX_VERSION_SUFFIX ${OPENTX_VERSION_SUFFIX}
|
ENV OPENTX_VERSION_SUFFIX ${OPENTX_VERSION_SUFFIX}
|
||||||
|
|
|
@ -1,61 +1,62 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import sys
|
import sys, os
|
||||||
try:
|
|
||||||
from PyQt5 import Qt, QtGui, QtCore
|
|
||||||
except:
|
|
||||||
from PyQt4 import Qt, QtGui, QtCore
|
|
||||||
|
|
||||||
import glob
|
import glob
|
||||||
|
|
||||||
app = Qt.QApplication(sys.argv)
|
from PIL import Image, ImageDraw, ImageFont
|
||||||
|
|
||||||
for f in glob.glob("fonts/*.ttf"):
|
chars_en = u""" !"#$%&'()*+,-./0123456789:;<=>?°ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz~|≥"""
|
||||||
QtGui.QFontDatabase.addApplicationFont(f)
|
|
||||||
|
|
||||||
chars_en = u""" !"#$%&'()*+,-./0123456789:;<=>?°ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz~|≥→←↑↓↗↘↙↖△"""
|
|
||||||
chars_fr = u"""éèàîç"""
|
chars_fr = u"""éèàîç"""
|
||||||
chars_de = u"""ÄäÖöÜüß"""
|
chars_de = u"""ÄäÖöÜüß"""
|
||||||
chars_cz = u"""ěščřžýáíéňóůúďťĚŠČŘŽÝÁÍÉŇÓÚŮĎŤ"""
|
chars_cz = u"""ěščřžýáíéňóůúďťĚŠČŘŽÝÁÍÉŇÓÚŮĎŤ"""
|
||||||
|
chars_es = u"""Ññ"""
|
||||||
|
chars_fi = u"""åäöÅÄÖ"""
|
||||||
|
chars_it = u"""àù"""
|
||||||
|
chars_pl = u"""ąćęłńóśżźĄĆĘŁŃÓŚŻŹ"""
|
||||||
|
chars_pt = u"""ÁáÂâÃãÀàÇçÉéÊêÍíÓóÔôÕõÚú"""
|
||||||
|
chars_se = u"""åäöÅÄÖ"""
|
||||||
|
|
||||||
COUNT_EXTRA_CHARS = 12
|
COUNT_EXTRA_CHARS = 21
|
||||||
|
|
||||||
chars_extra = u"".join([chr(1+i) for i in range(COUNT_EXTRA_CHARS)])
|
chars_extra = u"".join([chr(1+i) for i in range(COUNT_EXTRA_CHARS)])
|
||||||
chars = chars_en + chars_extra + chars_fr + chars_de + chars_cz
|
chars = chars_en + chars_extra + chars_fr + chars_de + chars_cz + chars_es + chars_fi + chars_it + chars_pl + chars_se
|
||||||
|
|
||||||
|
|
||||||
|
def createFontBitmap(filename, fontname, fontsize, fontoffset, foreground, background, coordsfile=True):
|
||||||
|
|
||||||
|
|
||||||
def createFontBitmap(filename, fontname, fontsize, fontbold, foreground, background, coordsfile=True):
|
|
||||||
coords = []
|
coords = []
|
||||||
font = QtGui.QFont(fontname)
|
font_filename = 'fonts/' + fontname + '.ttf'
|
||||||
font.setPixelSize(fontsize)
|
|
||||||
font.setBold(fontbold)
|
|
||||||
font.setHintingPreference(QtGui.QFont.PreferNoHinting)
|
|
||||||
font.setStyleStrategy(QtGui.QFont.PreferAntialias)
|
|
||||||
metrics = QtGui.QFontMetrics(font)
|
|
||||||
|
|
||||||
extraFilename = "fonts/extra_%dpx.png" % fontsize
|
print 'Font filename: %s' % font_filename
|
||||||
extraImage = QtGui.QImage(extraFilename)
|
font = ImageFont.truetype(font_filename, fontsize)
|
||||||
if extraImage.isNull():
|
|
||||||
# print("No extra font file", extraFilename)
|
extraImage = None
|
||||||
extraImage = None
|
extraWidth, extraHeight = 0, 0
|
||||||
extraWidth, extraHeight = 0, 0
|
extraFilename = 'fonts/extra_%dpx.png' % fontsize
|
||||||
else:
|
|
||||||
extraWidth, extraHeight = extraImage.size().width() / COUNT_EXTRA_CHARS, extraImage.size().height()
|
try:
|
||||||
|
extraImage = Image.open(extraFilename)
|
||||||
|
extraImage = extraImage.convert('RGB');
|
||||||
|
extraWidth, extraHeight = extraImage.size
|
||||||
|
|
||||||
|
extraWidth = extraWidth / COUNT_EXTRA_CHARS
|
||||||
|
|
||||||
|
except IOError:
|
||||||
|
print 'Missing extra symbol filename %s' % extraFilename
|
||||||
|
|
||||||
def getCharWidth(c):
|
def getCharWidth(c):
|
||||||
if c in chars_extra:
|
if c in chars_extra:
|
||||||
return extraWidth
|
if ord(c) <= 9:
|
||||||
|
return 13
|
||||||
|
else:
|
||||||
|
return 15
|
||||||
elif c == " ":
|
elif c == " ":
|
||||||
return 4
|
return 4
|
||||||
elif c == "." and fontsize <= 8:
|
|
||||||
return 1
|
|
||||||
else:
|
else:
|
||||||
r = metrics.boundingRect(c)
|
w, h = font.getsize(c)
|
||||||
if fontsize >= 24:
|
return w + 1
|
||||||
return r.width() + 3
|
|
||||||
else:
|
|
||||||
return r.width() + r.left() + 1
|
|
||||||
|
|
||||||
def getFontWidth():
|
def getFontWidth():
|
||||||
width = 0
|
width = 0
|
||||||
|
@ -63,57 +64,33 @@ def createFontBitmap(filename, fontname, fontsize, fontbold, foreground, backgro
|
||||||
width += getCharWidth(c)
|
width += getCharWidth(c)
|
||||||
return width
|
return width
|
||||||
|
|
||||||
def getFontTopBottom():
|
|
||||||
top, bottom = 0, 0
|
|
||||||
for i, c in enumerate(chars):
|
|
||||||
r = metrics.boundingRect(chars[i])
|
|
||||||
top = min(top, r.top())
|
|
||||||
bottom = max(bottom, r.bottom())
|
|
||||||
return top, bottom
|
|
||||||
|
|
||||||
width = getFontWidth()
|
width = getFontWidth()
|
||||||
top, bottom = getFontTopBottom()
|
image = Image.new('RGB', (width, fontsize + 4), background)
|
||||||
image = QtGui.QImage(width, fontsize + 4, QtGui.QImage.Format_RGB32)
|
draw = ImageDraw.Draw(image)
|
||||||
image.fill(background)
|
|
||||||
painter = QtGui.QPainter()
|
|
||||||
painter.begin(image)
|
|
||||||
painter.setFont(font)
|
|
||||||
pen = QtGui.QPen(foreground)
|
|
||||||
painter.setPen(pen)
|
|
||||||
width = 0
|
width = 0
|
||||||
for c in chars:
|
for c in chars:
|
||||||
coords.append(width)
|
coords.append(width)
|
||||||
painter.setOpacity(1.0)
|
|
||||||
if c in chars_extra:
|
if c in chars_extra:
|
||||||
if extraImage and c == chars_extra[0]:
|
if extraImage and c == chars_extra[0]:
|
||||||
for x in range(extraWidth * COUNT_EXTRA_CHARS):
|
image.paste(extraImage.copy(),(width,1))
|
||||||
for y in range(extraHeight):
|
|
||||||
rgb = extraImage.pixel(x, y)
|
|
||||||
painter.setOpacity(1.0 - float(QtGui.qGray(rgb)) / 256)
|
|
||||||
painter.drawPoint(x+width, y)
|
|
||||||
elif c == " ":
|
elif c == " ":
|
||||||
pass
|
pass
|
||||||
elif c == "." and fontsize <= 8:
|
|
||||||
painter.drawPoint(width, fontsize)
|
|
||||||
elif (c == u"↑" or c == u"↓") and fontsize == 16:
|
|
||||||
rect = metrics.boundingRect(c)
|
|
||||||
painter.drawText(width - 1, fontsize, c) # fontsize-bottom+1 -17 / 7
|
|
||||||
else:
|
else:
|
||||||
rect = metrics.boundingRect(c)
|
w, h = font.getsize(c)
|
||||||
if fontsize >= 24:
|
draw.text( (width + 1, fontoffset) , c, fill=foreground, font=font)
|
||||||
painter.drawText(width - rect.left() + 1, fontsize - 2, c) # fontsize-bottom+1 -17 / 7
|
|
||||||
else:
|
|
||||||
painter.drawText(width + 1, fontsize, c) # fontsize-bottom+1 -17 / 7
|
|
||||||
width += getCharWidth(c)
|
width += getCharWidth(c)
|
||||||
|
|
||||||
coords.append(width)
|
coords.append(width)
|
||||||
painter.end()
|
|
||||||
image.save(filename + ".png")
|
image.save(filename + ".png")
|
||||||
if coordsfile:
|
if coordsfile:
|
||||||
with open(filename + ".specs", "w") as f:
|
with open(filename + ".specs", "w") as f:
|
||||||
f.write(",".join(str(tmp) for tmp in coords))
|
f.write(",".join(str(tmp) for tmp in coords))
|
||||||
|
|
||||||
return coords
|
|
||||||
|
|
||||||
|
# Main
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
createFontBitmap(sys.argv[4], sys.argv[1], float(sys.argv[2]), sys.argv[3] == "True", QtGui.QColor(0x00, 0x00, 0x00), QtGui.QColor(0xFF, 0xFF, 0xFF))
|
createFontBitmap(sys.argv[4], sys.argv[1], int(sys.argv[2]), int(sys.argv[3]), (0,0,0), (255,255,255))
|
||||||
|
|