/ src / drivers / dvhstx / font.h
font.h
 1  /*
 2   * Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
 3   *
 4   * SPDX-License-Identifier: BSD-3-Clause
 5   */
 6  
 7  #ifndef _FONT_H
 8  #define _FONT_H
 9  
10  #include "pico/types.h"
11  
12  typedef struct {
13      uint16_t bitmap_index;
14      uint16_t adv_w;
15      int8_t box_w, box_h, ofs_x, ofs_y;
16  } __attribute__((packed)) lv_font_fmt_txt_glyph_dsc_t;
17  
18  typedef struct {
19      uint16_t range_start, range_length, glyph_id_start, list_length;
20      void *unicode_list, *glyph_id_ofs_list;
21      enum {
22          LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
23      } type;
24  } lv_font_fmt_txt_cmap_t;
25  
26  typedef struct {
27      const uint8_t *glyph_bitmap;
28      const lv_font_fmt_txt_glyph_dsc_t *glyph_dsc;
29      const lv_font_fmt_txt_cmap_t *cmaps;
30      uint8_t cmap_num, bpp, kern_scale, kern_classes;
31      void *kern_dsc;
32  } lv_font_fmt_txt_dsc_t;
33  
34  typedef struct {
35      lv_font_fmt_txt_dsc_t *dsc;
36      uint8_t line_height, base_line;
37  } lv_font_t;
38  
39  #define FONT_HEIGHT 23
40  extern const lv_font_t intel_one_mono;
41  
42  #endif //SOFTWARE_FONT_H