Browse Source

NUM_ARRAY => COUNT

pull/1/head
Scott Lahteine 6 years ago
parent
commit
4a7c6f7241
  1. 12
      Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp
  2. 2
      Marlin/src/lcd/dogm/fontdata/langdata_an.h
  3. 2
      Marlin/src/lcd/dogm/fontdata/langdata_bg.h
  4. 2
      Marlin/src/lcd/dogm/fontdata/langdata_ca.h
  5. 2
      Marlin/src/lcd/dogm/fontdata/langdata_cz.h
  6. 2
      Marlin/src/lcd/dogm/fontdata/langdata_da.h
  7. 2
      Marlin/src/lcd/dogm/fontdata/langdata_de.h
  8. 2
      Marlin/src/lcd/dogm/fontdata/langdata_el-gr.h
  9. 2
      Marlin/src/lcd/dogm/fontdata/langdata_el.h
  10. 2
      Marlin/src/lcd/dogm/fontdata/langdata_en.h
  11. 2
      Marlin/src/lcd/dogm/fontdata/langdata_es.h
  12. 2
      Marlin/src/lcd/dogm/fontdata/langdata_eu.h
  13. 2
      Marlin/src/lcd/dogm/fontdata/langdata_fi.h
  14. 2
      Marlin/src/lcd/dogm/fontdata/langdata_fr.h
  15. 2
      Marlin/src/lcd/dogm/fontdata/langdata_gl.h
  16. 2
      Marlin/src/lcd/dogm/fontdata/langdata_hr.h
  17. 2
      Marlin/src/lcd/dogm/fontdata/langdata_it.h
  18. 2
      Marlin/src/lcd/dogm/fontdata/langdata_jp-kana.h
  19. 2
      Marlin/src/lcd/dogm/fontdata/langdata_ko_KR.h
  20. 2
      Marlin/src/lcd/dogm/fontdata/langdata_nl.h
  21. 2
      Marlin/src/lcd/dogm/fontdata/langdata_pl.h
  22. 2
      Marlin/src/lcd/dogm/fontdata/langdata_pt-br.h
  23. 2
      Marlin/src/lcd/dogm/fontdata/langdata_pt.h
  24. 2
      Marlin/src/lcd/dogm/fontdata/langdata_ru.h
  25. 2
      Marlin/src/lcd/dogm/fontdata/langdata_sk.h
  26. 2
      Marlin/src/lcd/dogm/fontdata/langdata_test.h
  27. 2
      Marlin/src/lcd/dogm/fontdata/langdata_tr.h
  28. 2
      Marlin/src/lcd/dogm/fontdata/langdata_uk.h
  29. 2
      Marlin/src/lcd/dogm/fontdata/langdata_zh_CN.h
  30. 2
      Marlin/src/lcd/dogm/fontdata/langdata_zh_TW.h
  31. 2
      Marlin/src/lcd/dogm/ultralcd_DOGM.cpp
  32. 4
      Marlin/src/lcd/fontutils.h
  33. 2
      buildroot/share/fonts/uxggenpages.sh

12
Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp

@ -901,12 +901,12 @@ int lcd_put_wchar_max(wchar_t c, pixel_len_t max_length) {
return 1;
}
copy_address = NULL;
ret = pf_bsearch_r((void *)g_hd44780_charmap_device, NUM_ARRAY(g_hd44780_charmap_device), pf_bsearch_cb_comp_hd4map_pgm, (void *)&pinval, &idx);
ret = pf_bsearch_r((void *)g_hd44780_charmap_device, COUNT(g_hd44780_charmap_device), pf_bsearch_cb_comp_hd4map_pgm, (void *)&pinval, &idx);
if (ret >= 0) {
copy_address = (hd44780_charmap_t *)(g_hd44780_charmap_device + idx);
}
else {
ret = pf_bsearch_r((void *)g_hd44780_charmap_common, NUM_ARRAY(g_hd44780_charmap_common), pf_bsearch_cb_comp_hd4map_pgm, (void *)&pinval, &idx);
ret = pf_bsearch_r((void *)g_hd44780_charmap_common, COUNT(g_hd44780_charmap_common), pf_bsearch_cb_comp_hd4map_pgm, (void *)&pinval, &idx);
if (ret >= 0) copy_address = (hd44780_charmap_t *)(g_hd44780_charmap_common + idx);
}
@ -1014,13 +1014,13 @@ int lcd_put_u8str_max_P(PGM_P utf8_str_P, pixel_len_t max_length) {
int test_hd44780_charmap_all(void) {
int flg_error = 0;
if (test_hd44780_charmap(g_hd44780_charmap_device, NUM_ARRAY(g_hd44780_charmap_device), "g_hd44780_charmap_device", 0) < 0) {
if (test_hd44780_charmap(g_hd44780_charmap_device, COUNT(g_hd44780_charmap_device), "g_hd44780_charmap_device", 0) < 0) {
flg_error = 1;
test_hd44780_charmap(g_hd44780_charmap_device, NUM_ARRAY(g_hd44780_charmap_device), "g_hd44780_charmap_device", 1);
test_hd44780_charmap(g_hd44780_charmap_device, COUNT(g_hd44780_charmap_device), "g_hd44780_charmap_device", 1);
}
if (test_hd44780_charmap(g_hd44780_charmap_common, NUM_ARRAY(g_hd44780_charmap_common), "g_hd44780_charmap_common", 0) < 0) {
if (test_hd44780_charmap(g_hd44780_charmap_common, COUNT(g_hd44780_charmap_common), "g_hd44780_charmap_common", 0) < 0) {
flg_error = 1;
test_hd44780_charmap(g_hd44780_charmap_common, NUM_ARRAY(g_hd44780_charmap_common), "g_hd44780_charmap_common", 1);
test_hd44780_charmap(g_hd44780_charmap_common, COUNT(g_hd44780_charmap_common), "g_hd44780_charmap_common", 1);
}
if (flg_error) {
TRACE("\nFAILED in hd44780 tests!\n");

2
Marlin/src/lcd/dogm/fontdata/langdata_an.h

@ -5,5 +5,5 @@
*/
#include <U8glib.h>
#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

2
Marlin/src/lcd/dogm/fontdata/langdata_bg.h

@ -64,7 +64,7 @@ const u8g_fntpgm_uint8_t fontpage_8_206_207[39] U8G_FONT_SECTION("fontpage_8_206
0x00,0x05,0x05,0x05,0x06,0x00,0x00,0x90,0xa8,0xe8,0xa8,0x90,0x04,0x05,0x05,0x06,
0x01,0x00,0x70,0x90,0x70,0x50,0x90};
#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
FONTDATA_ITEM(8, 144, 149, fontpage_8_144_149), // 'А' -- 'Е'
FONTDATA_ITEM(8, 151, 152, fontpage_8_151_152), // 'З' -- 'И'

2
Marlin/src/lcd/dogm/fontdata/langdata_ca.h

@ -5,5 +5,5 @@
*/
#include <U8glib.h>
#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

2
Marlin/src/lcd/dogm/fontdata/langdata_cz.h

@ -38,7 +38,7 @@ const u8g_fntpgm_uint8_t fontpage_2_253_254[47] U8G_FONT_SECTION("fontpage_2_253
0x00,0x05,0x0a,0x0a,0x06,0x00,0x00,0x50,0x20,0x00,0xf8,0x08,0x10,0x20,0x40,0x80,
0xf8,0x05,0x08,0x08,0x06,0x00,0x00,0x50,0x20,0x00,0xf8,0x10,0x20,0x40,0xf8};
#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
FONTDATA_ITEM(2, 140, 141, fontpage_2_140_141), // 'Č' -- 'č'
FONTDATA_ITEM(2, 143, 143, fontpage_2_143_143), // 'ď' -- 'ď'

2
Marlin/src/lcd/dogm/fontdata/langdata_da.h

@ -5,5 +5,5 @@
*/
#include <U8glib.h>
#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

2
Marlin/src/lcd/dogm/fontdata/langdata_de.h

@ -5,5 +5,5 @@
*/
#include <U8glib.h>
#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

2
Marlin/src/lcd/dogm/fontdata/langdata_el-gr.h

@ -72,7 +72,7 @@ const u8g_fntpgm_uint8_t fontpage_64_166_166[24] U8G_FONT_SECTION("fontpage_64_1
0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xa6,0xa6,0x00,0x01,0x00,0x00,
0x00,0x05,0x01,0x01,0x06,0x00,0x00,0xa8};
#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
FONTDATA_ITEM(7, 136, 136, fontpage_7_136_136), // 'Έ' -- 'Έ'
FONTDATA_ITEM(7, 145, 157, fontpage_7_145_157), // 'Α' -- 'Ν'

2
Marlin/src/lcd/dogm/fontdata/langdata_el.h

@ -75,7 +75,7 @@ const u8g_fntpgm_uint8_t fontpage_64_166_166[24] U8G_FONT_SECTION("fontpage_64_1
0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xa6,0xa6,0x00,0x01,0x00,0x00,
0x00,0x05,0x01,0x01,0x06,0x00,0x00,0xa8};
#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
FONTDATA_ITEM(7, 136, 136, fontpage_7_136_136), // 'Έ' -- 'Έ'
FONTDATA_ITEM(7, 145, 157, fontpage_7_145_157), // 'Α' -- 'Ν'

2
Marlin/src/lcd/dogm/fontdata/langdata_en.h

@ -5,5 +5,5 @@
*/
#include <U8glib.h>
#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

2
Marlin/src/lcd/dogm/fontdata/langdata_es.h

@ -5,5 +5,5 @@
*/
#include <U8glib.h>
#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

2
Marlin/src/lcd/dogm/fontdata/langdata_eu.h

@ -5,5 +5,5 @@
*/
#include <U8glib.h>
#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

2
Marlin/src/lcd/dogm/fontdata/langdata_fi.h

@ -5,5 +5,5 @@
*/
#include <U8glib.h>
#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

2
Marlin/src/lcd/dogm/fontdata/langdata_fr.h

@ -5,5 +5,5 @@
*/
#include <U8glib.h>
#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

2
Marlin/src/lcd/dogm/fontdata/langdata_gl.h

@ -5,5 +5,5 @@
*/
#include <U8glib.h>
#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

2
Marlin/src/lcd/dogm/fontdata/langdata_hr.h

@ -22,7 +22,7 @@ const u8g_fntpgm_uint8_t fontpage_2_254_254[31] U8G_FONT_SECTION("fontpage_2_254
0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xfe,0xfe,0x00,0x08,0x00,0x00,
0x00,0x05,0x08,0x08,0x06,0x00,0x00,0x50,0x20,0x00,0xf8,0x10,0x20,0x40,0xf8};
#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
FONTDATA_ITEM(2, 135, 135, fontpage_2_135_135), // 'ć' -- 'ć'
FONTDATA_ITEM(2, 140, 141, fontpage_2_140_141), // 'Č' -- 'č'

2
Marlin/src/lcd/dogm/fontdata/langdata_it.h

@ -5,5 +5,5 @@
*/
#include <U8glib.h>
#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

2
Marlin/src/lcd/dogm/fontdata/langdata_jp-kana.h

@ -95,7 +95,7 @@ const u8g_fntpgm_uint8_t fontpage_97_252_252[24] U8G_FONT_SECTION("fontpage_97_2
0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xfc,0xfc,0x00,0x03,0x00,0x00,
0x00,0x05,0x01,0x01,0x06,0x00,0x02,0xf8};
#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
FONTDATA_ITEM(97, 161, 164, fontpage_97_161_164), // 'ァ' -- 'イ'
FONTDATA_ITEM(97, 166, 166, fontpage_97_166_166), // 'ウ' -- 'ウ'

2
Marlin/src/lcd/dogm/fontdata/langdata_ko_KR.h

@ -424,7 +424,7 @@ const u8g_fntpgm_uint8_t fontpage_431_136_136[34] U8G_FONT_SECTION("fontpage_431
0x00,0x08,0x0b,0x0b,0x0a,0x01,0xfe,0x71,0x01,0xfd,0x01,0x71,0x49,0x89,0x49,0x71,
0x01,0x01};
#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
FONTDATA_ITEM(344, 240, 240, fontpage_344_240_240), // '거' -- '거'
FONTDATA_ITEM(345, 224, 224, fontpage_345_224_224), // '고' -- '고'

2
Marlin/src/lcd/dogm/fontdata/langdata_nl.h

@ -5,5 +5,5 @@
*/
#include <U8glib.h>
#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

2
Marlin/src/lcd/dogm/fontdata/langdata_pl.h

@ -28,7 +28,7 @@ const u8g_fntpgm_uint8_t fontpage_2_252_252[30] U8G_FONT_SECTION("fontpage_2_252
0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xfc,0xfc,0x00,0x07,0x00,0x00,
0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x20,0x00,0xf8,0x10,0x20,0x40,0xf8};
#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
FONTDATA_ITEM(2, 133, 133, fontpage_2_133_133), // 'ą' -- 'ą'
FONTDATA_ITEM(2, 135, 135, fontpage_2_135_135), // 'ć' -- 'ć'

2
Marlin/src/lcd/dogm/fontdata/langdata_pt-br.h

@ -5,5 +5,5 @@
*/
#include <U8glib.h>
#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

2
Marlin/src/lcd/dogm/fontdata/langdata_pt.h

@ -5,5 +5,5 @@
*/
#include <U8glib.h>
#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

2
Marlin/src/lcd/dogm/fontdata/langdata_ru.h

@ -67,7 +67,7 @@ const u8g_fntpgm_uint8_t fontpage_8_209_209[30] U8G_FONT_SECTION("fontpage_8_209
0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xd1,0xd1,0x00,0x07,0x00,0x00,
0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x50,0x00,0x70,0x88,0xf0,0x80,0x70};
#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
FONTDATA_ITEM(8, 144, 152, fontpage_8_144_152), // 'А' -- 'И'
FONTDATA_ITEM(8, 154, 168, fontpage_8_154_168), // 'К' -- 'Ш'

2
Marlin/src/lcd/dogm/fontdata/langdata_sk.h

@ -46,7 +46,7 @@ const u8g_fntpgm_uint8_t fontpage_2_253_254[47] U8G_FONT_SECTION("fontpage_2_253
0x00,0x05,0x0a,0x0a,0x06,0x00,0x00,0x50,0x20,0x00,0xf8,0x08,0x10,0x20,0x40,0x80,
0xf8,0x05,0x08,0x08,0x06,0x00,0x00,0x50,0x20,0x00,0xf8,0x10,0x20,0x40,0xf8};
#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
FONTDATA_ITEM(2, 140, 143, fontpage_2_140_143), // 'Č' -- 'ď'
FONTDATA_ITEM(2, 185, 186, fontpage_2_185_186), // 'Ĺ' -- 'ĺ'

2
Marlin/src/lcd/dogm/fontdata/langdata_test.h

@ -217,7 +217,7 @@ const u8g_fntpgm_uint8_t fontpage_97_193_255[753] U8G_FONT_SECTION("fontpage_97_
0x28,0x80,0x60,0x10,0x08,0x05,0x06,0x06,0x06,0x00,0x00,0xf8,0x08,0x08,0x08,0x08,
0x08};
#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
FONTDATA_ITEM(8, 128, 255, fontpage_8_128_255), // 'Ѐ' -- 'ѿ'
FONTDATA_ITEM(97, 129, 191, fontpage_97_129_191), // 'め' -- 'タ'

2
Marlin/src/lcd/dogm/fontdata/langdata_tr.h

@ -17,7 +17,7 @@ const u8g_fntpgm_uint8_t fontpage_2_223_223[30] U8G_FONT_SECTION("fontpage_2_223
0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xdf,0xdf,0x00,0x05,0xfe,0x00,
0x00,0x05,0x07,0x07,0x06,0x00,0xfe,0x78,0x80,0x70,0x08,0xf0,0x10,0x60};
#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
FONTDATA_ITEM(2, 159, 159, fontpage_2_159_159), // 'ğ' -- 'ğ'
FONTDATA_ITEM(2, 176, 177, fontpage_2_176_177), // 'İ' -- 'ı'

2
Marlin/src/lcd/dogm/fontdata/langdata_uk.h

@ -76,7 +76,7 @@ const u8g_fntpgm_uint8_t fontpage_8_214_214[29] U8G_FONT_SECTION("fontpage_8_214
0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xd6,0xd6,0x00,0x06,0x00,0x00,
0x00,0x03,0x06,0x06,0x06,0x01,0x00,0x40,0x00,0xc0,0x40,0x40,0xe0};
#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
FONTDATA_ITEM(8, 134, 134, fontpage_8_134_134), // 'І' -- 'І'
FONTDATA_ITEM(8, 144, 146, fontpage_8_144_146), // 'А' -- 'В'

2
Marlin/src/lcd/dogm/fontdata/langdata_zh_CN.h

@ -1031,7 +1031,7 @@ const u8g_fntpgm_uint8_t fontpage_510_154_154[30] U8G_FONT_SECTION("fontpage_510
0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0x9a,0x9a,0x00,0x08,0x00,0x00,
0x00,0x02,0x07,0x07,0x0c,0x06,0x01,0xc0,0xc0,0x00,0x00,0x00,0xc0,0xc0};
#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
FONTDATA_ITEM(69, 191, 191, fontpage_69_191_191), // '⊿' -- '⊿'
FONTDATA_ITEM(156, 128, 128, fontpage_156_128_128), // '一' -- '一'

2
Marlin/src/lcd/dogm/fontdata/langdata_zh_TW.h

@ -1093,7 +1093,7 @@ const u8g_fntpgm_uint8_t fontpage_510_154_154[30] U8G_FONT_SECTION("fontpage_510
0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0x9a,0x9a,0x00,0x08,0x00,0x00,
0x00,0x02,0x07,0x07,0x0c,0x06,0x01,0xc0,0xc0,0x00,0x00,0x00,0xc0,0xc0};
#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
FONTDATA_ITEM(69, 191, 191, fontpage_69_191_191), // '⊿' -- '⊿'
FONTDATA_ITEM(156, 128, 128, fontpage_156_128_128), // '一' -- '一'

2
Marlin/src/lcd/dogm/ultralcd_DOGM.cpp

@ -215,7 +215,7 @@ void MarlinUI::init_lcd() {
u8g.setRot270(); // Rotate screen by 270°
#endif
uxg_SetUtf8Fonts(g_fontinfo, NUM_ARRAY(g_fontinfo));
uxg_SetUtf8Fonts(g_fontinfo, COUNT(g_fontinfo));
}
// The kill screen is displayed for unrecoverable conditions

4
Marlin/src/lcd/fontutils.h

@ -27,10 +27,6 @@ uint8_t read_byte_rom(uint8_t * str);
#define wchar_t uint32_t
//typedef uint32_t wchar_t;
#ifndef NUM_ARRAY
#define NUM_ARRAY(a) (sizeof(a)/sizeof((a)[0]))
#endif
typedef uint16_t pixel_len_t;
#define PIXEL_LEN_NOLIMIT ((pixel_len_t)(-1))

2
buildroot/share/fonts/uxggenpages.sh

@ -169,6 +169,6 @@ cat <<EOF >fontutf8-data.h
*/
#include <U8glib.h>
$TMPA
#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data}
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {$TMPB};
EOF

Loading…
Cancel
Save