#ifndef BP_LIB_FONT_H
#define BP_LIB_FONT_H
#include <Uefi.h>
#include "disk.h"
#include "graphic.h"
typedef struct {
  UINT8 encoding;
  UINT32 entries_count;
  UINT8 height;
  UINT8 width;
} bp_font_FBM_HEADER;
typedef struct {
  UINT32 codepoint;
  UINT8 *data;
} bp_font_FBM_CHAR;
typedef struct {
  UINT32 entries_count;
  bp_font_FBM_CHAR *chars;
} bp_font_FBM_FONT;
typedef struct {
  UINT8 shading;
  BOOLEAN enabled;
} bp_font_FBM_PIXEL;
typedef struct {
  UINT32 codepoint;
  bp_font_FBM_PIXEL *data;
} bp_font_FBM_CHAR_BUFFER;
typedef struct {
  UINT32 entries_count;
  bp_font_FBM_CHAR_BUFFER *chars;
} bp_font_FBM_FONT_BUFFER;
typedef struct {
  UINT32 codepoint;
  UINT8 width;
  UINT8 height;
  UINT32 red_bits;
  UINT32 green_bits;
  UINT32 blue_bits;
  UINT32 *data;
} bp_font_FBM_CHAR_RENDER;
typedef struct {
  UINT32 entries_count;
  bp_font_FBM_CHAR_RENDER *chars;
} bp_font_FBM_FONT_RENDER;
typedef struct {
  bp_graphic_COLOR_RGB background_color;
  bp_graphic_COLOR_RGB text_color;
  UINT32 red_bits;
  UINT32 green_bits;
  UINT32 blue_bits;
} bp_font_FBM_RENDERER_SETTING;
EFI_STATUS bp_font_get_header(bp_disk_FILE *fbm_file,bp_font_FBM_HEADER **header);
EFI_STATUS bp_font_load_font(bp_disk_FILE *fbm_file,bp_font_FBM_FONT **loaded_font);
EFI_STATUS bp_font_check_font(bp_font_FBM_FONT *font,bp_font_FBM_HEADER *header);
EFI_STATUS bp_font_parse_font(bp_font_FBM_FONT *font,bp_font_FBM_HEADER *header,bp_font_FBM_FONT_BUFFER **parsed_font);
EFI_STATUS bp_font_render_font(bp_font_FBM_FONT_BUFFER *font_buffer,bp_font_FBM_HEADER *header,bp_font_FBM_RENDERER_SETTING settings,bp_font_FBM_FONT_RENDER **rendered_font);
#endif
