-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathfont.h
82 lines (74 loc) · 1.66 KB
/
font.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
// ***************************************************************
// font.h - Creation date: 03/03/2023
// -------------------------------------------------------------
// NanoShell Copyright (C) 2023 - Licensed under GPL V3
//
// ***************************************************************
// Programmer(s): iProgramInCpp ([email protected])
// ***************************************************************
#ifndef _FONT_H
#define _FONT_H
/**
* An enum with the font types available.
*/
enum {
FONT_TAMSYN_REGULAR,
FONT_TAMSYN_BOLD,
FONT_PAPERM,
FONT_FAMISANS,
FONT_BASIC,
FONT_GLCD,
FONT_TAMSYN_MED_REGULAR,
FONT_TAMSYN_MED_BOLD,
FONT_TAMSYN_SMALL_REGULAR,
FONT_TAMSYN_SMALL_BOLD,
FONT_SYSTEM,
FONT_LAST,
};
enum
{
FONTTYPE_MONOSPACE,
FONTTYPE_SMALL,//varying width
FONTTYPE_GLCD,
FONTTYPE_BIG,
FONTTYPE_BITMAP,
FONTTYPE_PSF,
};
typedef struct
{
uint8_t m_width;
int m_offset;
}
CharacterData;
typedef struct
{
int m_charID;
CharacterData m_charData;
}
UnicodeCharacterData;
typedef struct
{
uint8_t m_fontType;
const
uint8_t *m_pFontData;
int m_charWidth;
int m_charHeight;
bool m_bAlreadyBold;
int m_altFontID; // Alternate variant. If the font is 'already bold', this will point to the regular version of the font.
int m_unicodeTableSize;
union {
int m_fontSpecific0;
int m_psf_charSize;
};
union {
int m_fontSpecific1;
};
union {
int m_fontSpecific2;
};
UnicodeCharacterData* m_pUnicodeTable;
CharacterData m_asciiData[256];
CharacterData m_replacementChar;
}
ScreenFont;
#endif//_FONT_H