Beispiel #1
0
// Lua: u8g.setFontRefHeightAll( self )
static int lu8g_setFontRefHeightAll( lua_State *L )
{
    lu8g_userdata_t *lud;

    if ((lud = get_lud( L )) == NULL)
        return 0;

    u8g_SetFontRefHeightAll( LU8G );

    return 0;
}
Beispiel #2
0
static void calculate_dimensions() {

    // When we query font dimensions, base them on the largest extent of all
    // the glyphs in the font:
    u8g_SetFontRefHeightAll( u8g );

    u8g_SetFont( u8g, num_selector_num_font );
    num_font_height = u8g_GetFontAscent( u8g );
    num_font_vsize = num_font_height - u8g_GetFontDescent( u8g );

    u8g_SetFont( u8g, menu_title_font );
    menu_title_font_height = u8g_GetFontAscent( u8g );
    menu_title_font_vsize = menu_title_font_height - u8g_GetFontDescent( u8g );

    u8g_SetFont( u8g, menu_list_font );
    menu_list_font_height = u8g_GetFontAscent( u8g );
    menu_list_font_vsize = menu_list_font_height - u8g_GetFontDescent( u8g );

}