28 lines
1.3 KiB
C
28 lines
1.3 KiB
C
#pragma once
|
|
|
|
#include "main.h"
|
|
#include "display_gfx.h"
|
|
// This structure describes a single character's display information
|
|
typedef struct
|
|
{
|
|
const uint8_t widthBits; // width, in bits (or pixels), of the character
|
|
const uint16_t offset; // offset of the character's bitmap, in bytes, into the the GFX_font_t's data array
|
|
|
|
} GFX_fontChar_t;
|
|
|
|
// Describes a single font
|
|
typedef struct
|
|
{
|
|
// uint8_t DownSpace; // Downs Space in pixels
|
|
uint8_t heightPixels; // height, in pages (8 pixels), of the font's characters
|
|
uint8_t startChar; // the first character in the font (e.g. in charInfo and data)
|
|
uint8_t endChar;
|
|
uint8_t interspacePixels; // number of pixels of interspace between characters
|
|
uint8_t spacePixels; // number of pixels of space character
|
|
const GFX_fontChar_t *charInfo; // pointer to array of char information
|
|
const uint8_t *data; // pointer to generated array of character visual representation
|
|
// char * FontFileName; // (Pointer) Font filename saved on SD card or 0 (null) otherwise
|
|
// uint8_t bitOrientation; // bits and byte orientation 0-T2B, 1-L2R
|
|
} GFX_font_t;
|
|
|
|
uint8_t DISP_writeString(GFX_display_t *disp, const GFX_font_t *font, uint8_t *text, uint8_t pos_x, uint8_t pos_y, GFX_BitmapColor_t color); |