46
46
#include "py/mphal.h"
47
47
#include "py/runtime.h"
48
48
49
- const char * font_list [] = {"Roboto-Black22" , "Roboto-BlackItalic24" ,
50
- "Roboto-Regular12" , "Roboto-Regular18" ,
51
- "Roboto-Regular22" , "PermanentMarker22" };
52
-
53
49
typedef struct _ugfx_obj_t { mp_obj_base_t base ; } ugfx_obj_t ;
54
50
55
51
STATIC mp_obj_t ugfx_init (void ) {
56
- // gwinSetDefaultFont(gdispOpenFont(font_list[0]));
57
- // gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
58
52
gfxInit ();
59
53
return mp_const_none ;
60
54
}
@@ -66,14 +60,6 @@ STATIC mp_obj_t ugfx_deinit(void) {
66
60
}
67
61
STATIC MP_DEFINE_CONST_FUN_OBJ_0 (ugfx_deinit_obj , ugfx_deinit );
68
62
69
- /// \method print_fonts()
70
- ///
71
- /// Prints the list of installed fonts
72
- ///
73
- STATIC mp_obj_t ugfx_print_fonts (void ) {
74
- return mp_obj_new_list (6 , (void * * )font_list );
75
- }
76
- STATIC MP_DEFINE_CONST_FUN_OBJ_0 (ugfx_print_fonts_obj , ugfx_print_fonts );
77
63
78
64
// PRIMITIVES
79
65
@@ -652,8 +638,6 @@ STATIC const mp_rom_map_elem_t ugfx_module_globals_table[] = {
652
638
{MP_OBJ_NEW_QSTR (MP_QSTR_polygon ), (mp_obj_t )& ugfx_polygon_obj },
653
639
{MP_OBJ_NEW_QSTR (MP_QSTR_fill_polygon ), (mp_obj_t )& ugfx_fill_polygon_obj },
654
640
655
- {MP_OBJ_NEW_QSTR (MP_QSTR_print_fonts ), (mp_obj_t )& ugfx_print_fonts_obj },
656
-
657
641
{MP_OBJ_NEW_QSTR (MP_QSTR_demo ), (mp_obj_t )& ugfx_demo_obj },
658
642
};
659
643
0 commit comments