Esempio n. 1
0
/* new font format */
void ICACHE_FLASH_ATTR ucg_read_font_info(ucg_font_info_t *font_info, const ucg_fntpgm_uint8_t *font)
{
  /* offset 0 */
  font_info->glyph_cnt = ucg_font_get_byte(font, 0);
  font_info->bbx_mode = ucg_font_get_byte(font, 1);
  font_info->bits_per_0 = ucg_font_get_byte(font, 2);
  font_info->bits_per_1 = ucg_font_get_byte(font, 3);
  
  /* offset 4 */
  font_info->bits_per_char_width = ucg_font_get_byte(font, 4);
  font_info->bits_per_char_height = ucg_font_get_byte(font, 5);
  font_info->bits_per_char_x = ucg_font_get_byte(font, 6);
  font_info->bits_per_char_y = ucg_font_get_byte(font, 7);
  font_info->bits_per_delta_x = ucg_font_get_byte(font, 8);
  
  /* offset 9 */
  font_info->max_char_width = ucg_font_get_byte(font, 9);
  font_info->max_char_height = ucg_font_get_byte(font, 10);
  font_info->x_offset = ucg_font_get_byte(font, 11);
  font_info->y_offset = ucg_font_get_byte(font, 12);
  
  /* offset 13 */
  font_info->ascent_A = ucg_font_get_byte(font, 13);
  font_info->descent_g = ucg_font_get_byte(font, 14);
  font_info->ascent_para = ucg_font_get_byte(font, 15);
  font_info->descent_para = ucg_font_get_byte(font, 16);
  
  /* offset 17 */
  font_info->start_pos_upper_A = ucg_font_get_word(font, 17);
  font_info->start_pos_lower_a = ucg_font_get_word(font, 19);  
}
Esempio n. 2
0
uint16_t ucg_font_GetEncoding97Pos(const void *font)
{
    return ucg_font_get_word(font, 8);
}