@dryanovski/gamefoo 0.2.3 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/animate.js +147 -0
- package/dist/core/asset.js +74 -0
- package/dist/core/behaviour.js +88 -0
- package/dist/core/behaviours/collidable.js +186 -0
- package/dist/core/behaviours/control.js +75 -0
- package/dist/core/behaviours/healtkit.js +153 -0
- package/dist/core/behaviours/sprite_render.js +193 -0
- package/dist/core/camera.js +134 -0
- package/dist/core/engine.d.ts +1 -1
- package/dist/core/engine.d.ts.map +1 -1
- package/dist/core/engine.js +527 -0
- package/dist/core/fonts/font_bitmap.js +205 -0
- package/dist/core/fonts/font_bitmap_prebuild.js +137 -0
- package/dist/core/fonts/internal/font_3x5.js +169 -0
- package/dist/core/fonts/internal/font_4x6.js +171 -0
- package/dist/core/fonts/internal/font_5x5.js +129 -0
- package/dist/core/fonts/internal/font_6x8.js +171 -0
- package/dist/core/fonts/internal/font_8x13.js +171 -0
- package/dist/core/fonts/internal/font_8x8.js +171 -0
- package/dist/core/game_object_register.js +134 -0
- package/dist/core/input.js +170 -0
- package/dist/core/sprite.js +222 -0
- package/dist/core/utils/perlin_noise.js +183 -0
- package/dist/core/world.js +304 -0
- package/dist/debug/monitor.js +47 -0
- package/dist/decorators/index.js +1 -0
- package/dist/decorators/log.js +42 -0
- package/dist/entities/dynamic_entity.js +99 -0
- package/dist/entities/entity.js +283 -0
- package/dist/entities/player.js +93 -0
- package/dist/entities/text.js +62 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +47 -29
- package/dist/subsystems/camera_system.d.ts +2 -2
- package/dist/subsystems/camera_system.d.ts.map +1 -1
- package/dist/subsystems/camera_system.js +41 -0
- package/dist/subsystems/collision_system.js +17 -0
- package/dist/subsystems/monitor_system.js +20 -0
- package/dist/subsystems/object_system.d.ts +1 -1
- package/dist/subsystems/object_system.d.ts.map +1 -1
- package/dist/subsystems/object_system.js +29 -0
- package/dist/subsystems/types.d.ts +1 -1
- package/dist/subsystems/types.d.ts.map +1 -1
- package/dist/subsystems/types.js +0 -0
- package/dist/types.js +10 -0
- package/package.json +17 -6
- package/src/core/animate.ts +159 -0
- package/src/core/asset.ts +76 -0
- package/src/core/behaviour.ts +145 -0
- package/src/core/behaviours/collidable.ts +296 -0
- package/src/core/behaviours/control.ts +80 -0
- package/src/core/behaviours/healtkit.ts +166 -0
- package/src/core/behaviours/sprite_render.ts +216 -0
- package/src/core/camera.ts +145 -0
- package/src/core/engine.ts +607 -0
- package/src/core/fonts/font_bitmap.ts +232 -0
- package/src/core/fonts/font_bitmap_prebuild.ts +141 -0
- package/src/core/fonts/internal/font_3x5.ts +178 -0
- package/src/core/fonts/internal/font_4x6.ts +180 -0
- package/src/core/fonts/internal/font_5x5.ts +137 -0
- package/src/core/fonts/internal/font_6x8.ts +180 -0
- package/src/core/fonts/internal/font_8x13.ts +180 -0
- package/src/core/fonts/internal/font_8x8.ts +180 -0
- package/src/core/game_object_register.ts +146 -0
- package/src/core/input.ts +182 -0
- package/src/core/sprite.ts +339 -0
- package/src/core/utils/perlin_noise.ts +196 -0
- package/src/core/world.ts +331 -0
- package/src/debug/monitor.ts +60 -0
- package/src/decorators/index.ts +1 -0
- package/src/decorators/log.ts +45 -0
- package/src/entities/dynamic_entity.ts +106 -0
- package/src/entities/entity.ts +322 -0
- package/src/entities/player.ts +99 -0
- package/src/entities/text.ts +72 -0
- package/src/index.ts +51 -0
- package/src/subsystems/camera_system.ts +52 -0
- package/src/subsystems/collision_system.ts +21 -0
- package/src/subsystems/monitor_system.ts +26 -0
- package/src/subsystems/object_system.ts +37 -0
- package/src/subsystems/types.ts +46 -0
- package/src/types.ts +178 -0
- package/dist/index.js.map +0 -9
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Built-in 4x6 pixel bitmap font.
|
|
3
|
+
*
|
|
4
|
+
* Each character is a 4-pixel-wide, 6-pixel-tall glyph stored as an
|
|
5
|
+
* array of 6 integers. Each integer is a bitmask where bit 3
|
|
6
|
+
* (MSB) corresponds to the leftmost pixel and bit 0 to the rightmost.
|
|
7
|
+
*
|
|
8
|
+
* Small but readable, good for status bars.
|
|
9
|
+
*
|
|
10
|
+
* Supported characters: uppercase A–Z, lowercase a–z, digits 0–9,
|
|
11
|
+
* and common punctuation / special characters.
|
|
12
|
+
*
|
|
13
|
+
* @category Fonts
|
|
14
|
+
* @since 0.2.0
|
|
15
|
+
* @internal
|
|
16
|
+
*
|
|
17
|
+
* @example Reading a glyph
|
|
18
|
+
* ```ts
|
|
19
|
+
* import FONT_4x6 from "./font_4x6";
|
|
20
|
+
*
|
|
21
|
+
* const letterA = FONT_4x6["A"];
|
|
22
|
+
* // 6, 9, 9, 15, 9, 9
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/** Catalogue name used by {@link FontBitmap} to look up this font. */
|
|
27
|
+
export const FONT_4x6_NAME = "4x6";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Glyph width in pixels (excluding spacing).
|
|
31
|
+
* @defaultValue `4`
|
|
32
|
+
*/
|
|
33
|
+
export const FONT_4x6_WIDTH = 4;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Glyph height in pixels.
|
|
37
|
+
* @defaultValue `6`
|
|
38
|
+
*/
|
|
39
|
+
export const FONT_4x6_HEIGHT = 6;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Horizontal spacing between glyphs in pixels.
|
|
43
|
+
* @defaultValue `1`
|
|
44
|
+
*/
|
|
45
|
+
export const FONT_4x6_SPACING = 1;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Complete set of supported characters as a single string.
|
|
49
|
+
*/
|
|
50
|
+
export const FONT_4x6_CHARS =
|
|
51
|
+
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz !?.,:;-+*/\\()[]{}<>=#%&@^_'\"`~|$";
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Glyph data keyed by character.
|
|
55
|
+
*
|
|
56
|
+
* Each value is a 6-element `number[]` where each entry is a 4-bit
|
|
57
|
+
* row bitmask (bit 3 = leftmost pixel, bit 0 = rightmost pixel).
|
|
58
|
+
*
|
|
59
|
+
* @see {@link FontBitmap} — consumes this data for rendering
|
|
60
|
+
*/
|
|
61
|
+
export const FONT_4x6: Record<string, number[]> = {
|
|
62
|
+
"0": [6, 9, 11, 13, 9, 6],
|
|
63
|
+
"1": [2, 6, 2, 2, 2, 7],
|
|
64
|
+
"2": [6, 9, 1, 6, 8, 15],
|
|
65
|
+
"3": [14, 1, 6, 1, 1, 14],
|
|
66
|
+
"4": [3, 5, 9, 15, 1, 1],
|
|
67
|
+
"5": [15, 8, 14, 1, 1, 14],
|
|
68
|
+
"6": [3, 4, 14, 9, 9, 6],
|
|
69
|
+
"7": [15, 1, 2, 4, 4, 4],
|
|
70
|
+
"8": [6, 9, 6, 9, 9, 6],
|
|
71
|
+
"9": [6, 9, 9, 7, 1, 12],
|
|
72
|
+
A: [6, 9, 9, 15, 9, 9],
|
|
73
|
+
B: [14, 9, 14, 9, 9, 14],
|
|
74
|
+
C: [7, 8, 8, 8, 8, 7],
|
|
75
|
+
D: [14, 9, 9, 9, 9, 14],
|
|
76
|
+
E: [15, 8, 14, 8, 8, 15],
|
|
77
|
+
F: [15, 8, 14, 8, 8, 8],
|
|
78
|
+
G: [7, 8, 8, 11, 9, 7],
|
|
79
|
+
H: [9, 9, 15, 9, 9, 9],
|
|
80
|
+
I: [14, 4, 4, 4, 4, 14],
|
|
81
|
+
J: [7, 1, 1, 1, 9, 6],
|
|
82
|
+
K: [9, 10, 12, 10, 9, 9],
|
|
83
|
+
L: [8, 8, 8, 8, 8, 15],
|
|
84
|
+
M: [9, 15, 15, 9, 9, 9],
|
|
85
|
+
N: [9, 13, 11, 9, 9, 9],
|
|
86
|
+
O: [6, 9, 9, 9, 9, 6],
|
|
87
|
+
P: [14, 9, 9, 14, 8, 8],
|
|
88
|
+
Q: [6, 9, 9, 9, 6, 3],
|
|
89
|
+
R: [14, 9, 9, 14, 9, 9],
|
|
90
|
+
S: [7, 8, 6, 1, 1, 14],
|
|
91
|
+
T: [15, 4, 4, 4, 4, 4],
|
|
92
|
+
U: [9, 9, 9, 9, 9, 6],
|
|
93
|
+
V: [9, 9, 9, 9, 6, 6],
|
|
94
|
+
W: [9, 9, 9, 15, 15, 9],
|
|
95
|
+
X: [9, 9, 6, 6, 9, 9],
|
|
96
|
+
Y: [9, 9, 6, 4, 4, 4],
|
|
97
|
+
Z: [15, 1, 2, 4, 8, 15],
|
|
98
|
+
a: [0, 6, 1, 7, 9, 7],
|
|
99
|
+
b: [8, 8, 14, 9, 9, 14],
|
|
100
|
+
c: [0, 7, 8, 8, 8, 7],
|
|
101
|
+
d: [1, 1, 7, 9, 9, 7],
|
|
102
|
+
e: [0, 6, 9, 15, 8, 7],
|
|
103
|
+
f: [3, 4, 14, 4, 4, 4],
|
|
104
|
+
g: [0, 7, 9, 7, 1, 14],
|
|
105
|
+
h: [8, 8, 14, 9, 9, 9],
|
|
106
|
+
i: [0, 4, 0, 4, 4, 6],
|
|
107
|
+
j: [0, 2, 0, 2, 2, 12],
|
|
108
|
+
k: [8, 9, 10, 12, 10, 9],
|
|
109
|
+
l: [4, 4, 4, 4, 4, 3],
|
|
110
|
+
m: [0, 0, 14, 15, 9, 9],
|
|
111
|
+
n: [0, 0, 14, 9, 9, 9],
|
|
112
|
+
o: [0, 0, 6, 9, 9, 6],
|
|
113
|
+
p: [0, 0, 14, 9, 14, 8],
|
|
114
|
+
q: [0, 0, 7, 9, 7, 1],
|
|
115
|
+
r: [0, 0, 7, 8, 8, 8],
|
|
116
|
+
s: [0, 0, 7, 12, 3, 14],
|
|
117
|
+
t: [4, 4, 14, 4, 4, 3],
|
|
118
|
+
u: [0, 0, 9, 9, 9, 7],
|
|
119
|
+
v: [0, 0, 9, 9, 6, 6],
|
|
120
|
+
w: [0, 0, 9, 9, 15, 9],
|
|
121
|
+
x: [0, 0, 9, 6, 6, 9],
|
|
122
|
+
y: [0, 0, 9, 7, 1, 14],
|
|
123
|
+
z: [0, 0, 15, 2, 4, 15],
|
|
124
|
+
" ": [0, 0, 0, 0, 0, 0],
|
|
125
|
+
"!": [2, 2, 2, 2, 0, 2],
|
|
126
|
+
"?": [6, 9, 1, 2, 0, 2],
|
|
127
|
+
".": [0, 0, 0, 0, 0, 4],
|
|
128
|
+
",": [0, 0, 0, 0, 4, 8],
|
|
129
|
+
":": [0, 4, 0, 4, 0, 0],
|
|
130
|
+
";": [0, 4, 0, 4, 4, 8],
|
|
131
|
+
"-": [0, 0, 15, 0, 0, 0],
|
|
132
|
+
"+": [0, 4, 14, 4, 0, 0],
|
|
133
|
+
"*": [0, 9, 6, 6, 9, 0],
|
|
134
|
+
"/": [1, 1, 2, 4, 8, 8],
|
|
135
|
+
"\\": [8, 8, 4, 2, 1, 1],
|
|
136
|
+
"(": [2, 4, 4, 4, 4, 2],
|
|
137
|
+
")": [4, 2, 2, 2, 2, 4],
|
|
138
|
+
"[": [6, 4, 4, 4, 4, 6],
|
|
139
|
+
"]": [6, 2, 2, 2, 2, 6],
|
|
140
|
+
"{": [3, 4, 12, 4, 4, 3],
|
|
141
|
+
"}": [12, 2, 3, 2, 2, 12],
|
|
142
|
+
"<": [1, 2, 4, 4, 2, 1],
|
|
143
|
+
">": [8, 4, 2, 2, 4, 8],
|
|
144
|
+
"=": [0, 15, 0, 15, 0, 0],
|
|
145
|
+
"#": [5, 15, 5, 15, 5, 0],
|
|
146
|
+
"%": [9, 1, 2, 4, 8, 9],
|
|
147
|
+
"&": [4, 10, 4, 10, 9, 7],
|
|
148
|
+
"@": [6, 9, 11, 11, 8, 6],
|
|
149
|
+
"^": [4, 10, 0, 0, 0, 0],
|
|
150
|
+
_: [0, 0, 0, 0, 0, 15],
|
|
151
|
+
"'": [6, 4, 0, 0, 0, 0],
|
|
152
|
+
'"': [10, 10, 0, 0, 0, 0],
|
|
153
|
+
"`": [8, 4, 0, 0, 0, 0],
|
|
154
|
+
"~": [0, 6, 9, 9, 0, 0],
|
|
155
|
+
"|": [4, 4, 4, 4, 4, 4],
|
|
156
|
+
$: [4, 7, 12, 7, 1, 14],
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Complete metadata object for the 4x6 font, used by the
|
|
161
|
+
* {@link FontBitmap} catalogue at module load time.
|
|
162
|
+
*
|
|
163
|
+
* @internal
|
|
164
|
+
*/
|
|
165
|
+
export const metadata = {
|
|
166
|
+
/** Catalogue name. */
|
|
167
|
+
name: FONT_4x6_NAME,
|
|
168
|
+
/** Cell width including spacing (4 + 1 = 5). */
|
|
169
|
+
width: FONT_4x6_WIDTH + FONT_4x6_SPACING,
|
|
170
|
+
/** Cell height (6). */
|
|
171
|
+
height: FONT_4x6_HEIGHT,
|
|
172
|
+
/** Inter-glyph spacing (1). */
|
|
173
|
+
spacing: FONT_4x6_SPACING,
|
|
174
|
+
/** Supported character string. */
|
|
175
|
+
chars: FONT_4x6_CHARS,
|
|
176
|
+
/** Glyph bitmask data. */
|
|
177
|
+
data: FONT_4x6,
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
export default FONT_4x6;
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Built-in 5x5 pixel bitmap font.
|
|
3
|
+
*
|
|
4
|
+
* Each character is a 5-pixel-wide, 5-pixel-tall glyph stored as an
|
|
5
|
+
* array of five integers. Each integer is a bitmask where bit 4
|
|
6
|
+
* (MSB) corresponds to the leftmost pixel and bit 0 to the rightmost.
|
|
7
|
+
*
|
|
8
|
+
* Supported characters: `A–Z`, `0–9`, and space.
|
|
9
|
+
*
|
|
10
|
+
* @category Fonts
|
|
11
|
+
* @since 0.1.0
|
|
12
|
+
* @internal
|
|
13
|
+
*
|
|
14
|
+
* @example Reading a glyph
|
|
15
|
+
* ```ts
|
|
16
|
+
* import FONT_5x5 from "./font_5x5";
|
|
17
|
+
*
|
|
18
|
+
* const letterA = FONT_5x5["A"];
|
|
19
|
+
* // [14, 17, 31, 17, 17]
|
|
20
|
+
* //
|
|
21
|
+
* // .###. = 0b01110 = 14
|
|
22
|
+
* // #...# = 0b10001 = 17
|
|
23
|
+
* // ##### = 0b11111 = 31
|
|
24
|
+
* // #...# = 0b10001 = 17
|
|
25
|
+
* // #...# = 0b10001 = 17
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
/** Catalogue name used by {@link FontBitmap} to look up this font. */
|
|
30
|
+
export const FONT_5x5_NAME = "5x5";
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Glyph width in pixels (excluding spacing).
|
|
34
|
+
* @defaultValue `5`
|
|
35
|
+
*/
|
|
36
|
+
export const FONT_5x5_WIDTH = 5;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Glyph height in pixels.
|
|
40
|
+
* @defaultValue `5`
|
|
41
|
+
*/
|
|
42
|
+
export const FONT_5x5_HEIGHT = 5;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Horizontal spacing between glyphs in pixels.
|
|
46
|
+
* @defaultValue `1`
|
|
47
|
+
*/
|
|
48
|
+
export const FONT_5x5_SPACING = 1;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Complete set of supported characters as a single string.
|
|
52
|
+
*/
|
|
53
|
+
export const FONT_5x5_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789";
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Glyph data keyed by character.
|
|
57
|
+
*
|
|
58
|
+
* Each value is a 5-element `number[]` where each entry is a 5-bit
|
|
59
|
+
* row bitmask (bit 4 = leftmost pixel, bit 0 = rightmost pixel).
|
|
60
|
+
*
|
|
61
|
+
* @see {@link FontBitmap} — consumes this data for rendering
|
|
62
|
+
*/
|
|
63
|
+
export const FONT_5x5: Record<string, number[]> = {
|
|
64
|
+
A: [14, 17, 31, 17, 17],
|
|
65
|
+
B: [30, 17, 30, 17, 30],
|
|
66
|
+
C: [15, 16, 16, 16, 15],
|
|
67
|
+
D: [30, 17, 17, 17, 30],
|
|
68
|
+
E: [31, 16, 28, 16, 31],
|
|
69
|
+
F: [31, 16, 28, 16, 16],
|
|
70
|
+
G: [15, 16, 19, 17, 15],
|
|
71
|
+
H: [17, 17, 31, 17, 17],
|
|
72
|
+
I: [31, 4, 4, 4, 31],
|
|
73
|
+
L: [16, 16, 16, 16, 31],
|
|
74
|
+
M: [17, 27, 21, 17, 17],
|
|
75
|
+
N: [17, 25, 21, 19, 17],
|
|
76
|
+
O: [14, 17, 17, 17, 14],
|
|
77
|
+
P: [30, 17, 30, 16, 16],
|
|
78
|
+
R: [30, 17, 30, 18, 17],
|
|
79
|
+
S: [15, 16, 14, 1, 30],
|
|
80
|
+
T: [31, 4, 4, 4, 4],
|
|
81
|
+
U: [17, 17, 17, 17, 14],
|
|
82
|
+
V: [17, 17, 17, 10, 4],
|
|
83
|
+
W: [17, 17, 21, 27, 17],
|
|
84
|
+
Y: [17, 10, 4, 4, 4],
|
|
85
|
+
" ": [0, 0, 0, 0, 0],
|
|
86
|
+
"0": [14, 17, 17, 17, 14],
|
|
87
|
+
"1": [4, 12, 4, 4, 14],
|
|
88
|
+
"2": [14, 17, 6, 8, 31],
|
|
89
|
+
"3": [30, 1, 14, 1, 30],
|
|
90
|
+
"4": [18, 18, 31, 2, 2],
|
|
91
|
+
"5": [31, 16, 30, 1, 30],
|
|
92
|
+
"6": [14, 16, 30, 17, 14],
|
|
93
|
+
"7": [31, 1, 2, 4, 4],
|
|
94
|
+
"8": [14, 17, 14, 17, 14],
|
|
95
|
+
"9": [14, 17, 15, 1, 14],
|
|
96
|
+
".": [0, 0, 0, 12, 12],
|
|
97
|
+
",": [0, 0, 0, 12, 4],
|
|
98
|
+
"/": [1, 2, 4, 8, 16],
|
|
99
|
+
"|": [4, 4, 4, 4, 4],
|
|
100
|
+
"(": [2, 4, 4, 4, 2],
|
|
101
|
+
")": [8, 4, 4, 4, 8],
|
|
102
|
+
"?": [14, 17, 6, 0, 4],
|
|
103
|
+
"!": [4, 4, 4, 0, 4],
|
|
104
|
+
"#": [10, 31, 10, 31, 10],
|
|
105
|
+
$: [14, 16, 14, 1, 14],
|
|
106
|
+
"%": [19, 9, 4, 18, 25],
|
|
107
|
+
"@": [14, 17, 21, 21, 14],
|
|
108
|
+
"^": [4, 10, 17, 0, 0],
|
|
109
|
+
"&": [14, 17, 14, 21, 14],
|
|
110
|
+
"*": [0, 10, 4, 10, 0],
|
|
111
|
+
"-": [0, 0, 31, 0, 0],
|
|
112
|
+
"+": [0, 4, 14, 4, 0],
|
|
113
|
+
"=": [0, 14, 0, 14, 0],
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Complete metadata object for the 5x5 font, used by the
|
|
118
|
+
* {@link FontBitmap} catalogue at module load time.
|
|
119
|
+
*
|
|
120
|
+
* @internal
|
|
121
|
+
*/
|
|
122
|
+
export const metadata = {
|
|
123
|
+
/** Catalogue name. */
|
|
124
|
+
name: FONT_5x5_NAME,
|
|
125
|
+
/** Cell width including spacing (5 + 1 = 6). */
|
|
126
|
+
width: FONT_5x5_WIDTH + FONT_5x5_SPACING,
|
|
127
|
+
/** Cell height (5). */
|
|
128
|
+
height: FONT_5x5_HEIGHT,
|
|
129
|
+
/** Inter-glyph spacing (1). */
|
|
130
|
+
spacing: FONT_5x5_SPACING,
|
|
131
|
+
/** Supported character string. */
|
|
132
|
+
chars: FONT_5x5_CHARS,
|
|
133
|
+
/** Glyph bitmask data. */
|
|
134
|
+
data: FONT_5x5,
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
export default FONT_5x5;
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Built-in 6x8 pixel bitmap font.
|
|
3
|
+
*
|
|
4
|
+
* Each character is a 6-pixel-wide, 8-pixel-tall glyph stored as an
|
|
5
|
+
* array of 8 integers. Each integer is a bitmask where bit 5
|
|
6
|
+
* (MSB) corresponds to the leftmost pixel and bit 0 to the rightmost.
|
|
7
|
+
*
|
|
8
|
+
* Classic arcade and console aesthetic.
|
|
9
|
+
*
|
|
10
|
+
* Supported characters: uppercase A–Z, lowercase a–z, digits 0–9,
|
|
11
|
+
* and common punctuation / special characters.
|
|
12
|
+
*
|
|
13
|
+
* @category Fonts
|
|
14
|
+
* @since 0.2.0
|
|
15
|
+
* @internal
|
|
16
|
+
*
|
|
17
|
+
* @example Reading a glyph
|
|
18
|
+
* ```ts
|
|
19
|
+
* import FONT_6x8 from "./font_6x8";
|
|
20
|
+
*
|
|
21
|
+
* const letterA = FONT_6x8["A"];
|
|
22
|
+
* // 12, 18, 33, 33, 63, 33, 33, 0
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/** Catalogue name used by {@link FontBitmap} to look up this font. */
|
|
27
|
+
export const FONT_6x8_NAME = "6x8";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Glyph width in pixels (excluding spacing).
|
|
31
|
+
* @defaultValue `6`
|
|
32
|
+
*/
|
|
33
|
+
export const FONT_6x8_WIDTH = 6;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Glyph height in pixels.
|
|
37
|
+
* @defaultValue `8`
|
|
38
|
+
*/
|
|
39
|
+
export const FONT_6x8_HEIGHT = 8;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Horizontal spacing between glyphs in pixels.
|
|
43
|
+
* @defaultValue `1`
|
|
44
|
+
*/
|
|
45
|
+
export const FONT_6x8_SPACING = 1;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Complete set of supported characters as a single string.
|
|
49
|
+
*/
|
|
50
|
+
export const FONT_6x8_CHARS =
|
|
51
|
+
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz !?.,:;-+*/\\()[]{}<>=#%&@^_'\"`~|$";
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Glyph data keyed by character.
|
|
55
|
+
*
|
|
56
|
+
* Each value is a 8-element `number[]` where each entry is a 6-bit
|
|
57
|
+
* row bitmask (bit 5 = leftmost pixel, bit 0 = rightmost pixel).
|
|
58
|
+
*
|
|
59
|
+
* @see {@link FontBitmap} — consumes this data for rendering
|
|
60
|
+
*/
|
|
61
|
+
export const FONT_6x8: Record<string, number[]> = {
|
|
62
|
+
"0": [30, 33, 35, 37, 41, 49, 30, 0],
|
|
63
|
+
"1": [12, 28, 12, 12, 12, 12, 63, 0],
|
|
64
|
+
"2": [30, 33, 1, 14, 16, 32, 63, 0],
|
|
65
|
+
"3": [30, 33, 1, 30, 1, 33, 30, 0],
|
|
66
|
+
"4": [6, 14, 22, 38, 63, 6, 6, 0],
|
|
67
|
+
"5": [63, 32, 62, 1, 1, 33, 30, 0],
|
|
68
|
+
"6": [30, 33, 32, 62, 33, 33, 30, 0],
|
|
69
|
+
"7": [63, 1, 2, 4, 8, 16, 32, 0],
|
|
70
|
+
"8": [30, 33, 33, 30, 33, 33, 30, 0],
|
|
71
|
+
"9": [30, 33, 33, 31, 1, 33, 30, 0],
|
|
72
|
+
A: [12, 18, 33, 33, 63, 33, 33, 0],
|
|
73
|
+
B: [62, 33, 33, 62, 33, 33, 62, 0],
|
|
74
|
+
C: [30, 33, 32, 32, 32, 33, 30, 0],
|
|
75
|
+
D: [60, 34, 33, 33, 33, 34, 60, 0],
|
|
76
|
+
E: [63, 32, 32, 60, 32, 32, 63, 0],
|
|
77
|
+
F: [63, 32, 32, 60, 32, 32, 32, 0],
|
|
78
|
+
G: [30, 33, 32, 39, 33, 33, 31, 0],
|
|
79
|
+
H: [33, 33, 33, 63, 33, 33, 33, 0],
|
|
80
|
+
I: [30, 12, 12, 12, 12, 12, 30, 0],
|
|
81
|
+
J: [15, 3, 3, 3, 3, 35, 30, 0],
|
|
82
|
+
K: [33, 34, 36, 40, 52, 34, 33, 0],
|
|
83
|
+
L: [32, 32, 32, 32, 32, 32, 63, 0],
|
|
84
|
+
M: [33, 51, 45, 37, 33, 33, 33, 0],
|
|
85
|
+
N: [33, 49, 41, 37, 35, 33, 33, 0],
|
|
86
|
+
O: [30, 33, 33, 33, 33, 33, 30, 0],
|
|
87
|
+
P: [62, 33, 33, 62, 32, 32, 32, 0],
|
|
88
|
+
Q: [30, 33, 33, 33, 37, 34, 29, 0],
|
|
89
|
+
R: [62, 33, 33, 62, 36, 34, 33, 0],
|
|
90
|
+
S: [31, 32, 32, 30, 1, 1, 62, 0],
|
|
91
|
+
T: [63, 12, 12, 12, 12, 12, 12, 0],
|
|
92
|
+
U: [33, 33, 33, 33, 33, 33, 30, 0],
|
|
93
|
+
V: [33, 33, 33, 33, 18, 18, 12, 0],
|
|
94
|
+
W: [33, 33, 33, 37, 45, 51, 33, 0],
|
|
95
|
+
X: [33, 18, 12, 12, 18, 33, 33, 0],
|
|
96
|
+
Y: [33, 33, 18, 12, 12, 12, 12, 0],
|
|
97
|
+
Z: [63, 1, 2, 12, 16, 32, 63, 0],
|
|
98
|
+
a: [0, 0, 30, 1, 31, 33, 31, 0],
|
|
99
|
+
b: [32, 32, 46, 49, 33, 49, 46, 0],
|
|
100
|
+
c: [0, 0, 30, 32, 32, 32, 30, 0],
|
|
101
|
+
d: [1, 1, 29, 35, 33, 35, 29, 0],
|
|
102
|
+
e: [0, 0, 30, 33, 63, 32, 30, 0],
|
|
103
|
+
f: [14, 17, 16, 60, 16, 16, 16, 0],
|
|
104
|
+
g: [0, 29, 35, 33, 31, 1, 30, 0],
|
|
105
|
+
h: [32, 32, 46, 49, 33, 33, 33, 0],
|
|
106
|
+
i: [12, 0, 12, 28, 12, 12, 30, 0],
|
|
107
|
+
j: [6, 0, 6, 6, 6, 38, 28, 0],
|
|
108
|
+
k: [32, 32, 33, 38, 56, 38, 33, 0],
|
|
109
|
+
l: [24, 8, 8, 8, 8, 8, 30, 0],
|
|
110
|
+
m: [0, 0, 54, 41, 33, 33, 33, 0],
|
|
111
|
+
n: [0, 0, 46, 49, 33, 33, 33, 0],
|
|
112
|
+
o: [0, 0, 30, 33, 33, 33, 30, 0],
|
|
113
|
+
p: [0, 46, 49, 33, 49, 46, 32, 32],
|
|
114
|
+
q: [0, 29, 35, 33, 35, 29, 1, 1],
|
|
115
|
+
r: [0, 0, 30, 32, 32, 32, 32, 0],
|
|
116
|
+
s: [0, 0, 31, 32, 30, 1, 62, 0],
|
|
117
|
+
t: [16, 16, 60, 16, 16, 17, 14, 0],
|
|
118
|
+
u: [0, 0, 33, 33, 33, 35, 29, 0],
|
|
119
|
+
v: [0, 0, 33, 33, 18, 18, 12, 0],
|
|
120
|
+
w: [0, 0, 33, 33, 37, 45, 18, 0],
|
|
121
|
+
x: [0, 0, 33, 18, 12, 18, 33, 0],
|
|
122
|
+
y: [0, 33, 33, 33, 31, 1, 30, 0],
|
|
123
|
+
z: [0, 0, 63, 2, 12, 16, 63, 0],
|
|
124
|
+
" ": [0, 0, 0, 0, 0, 0, 0, 0],
|
|
125
|
+
"!": [12, 12, 12, 12, 12, 0, 12, 0],
|
|
126
|
+
"?": [30, 33, 1, 6, 12, 0, 12, 0],
|
|
127
|
+
".": [0, 0, 0, 0, 0, 12, 12, 0],
|
|
128
|
+
",": [0, 0, 0, 0, 12, 12, 24, 0],
|
|
129
|
+
":": [0, 12, 12, 0, 12, 12, 0, 0],
|
|
130
|
+
";": [0, 12, 12, 0, 12, 12, 24, 0],
|
|
131
|
+
"-": [0, 0, 0, 63, 0, 0, 0, 0],
|
|
132
|
+
"+": [0, 12, 12, 63, 12, 12, 0, 0],
|
|
133
|
+
"*": [0, 33, 18, 12, 18, 33, 0, 0],
|
|
134
|
+
"/": [1, 1, 2, 12, 16, 32, 0, 0],
|
|
135
|
+
"\\": [32, 16, 8, 4, 2, 1, 0, 0],
|
|
136
|
+
"(": [6, 12, 24, 24, 24, 12, 6, 0],
|
|
137
|
+
")": [24, 12, 6, 6, 6, 12, 24, 0],
|
|
138
|
+
"[": [30, 16, 16, 16, 16, 16, 30, 0],
|
|
139
|
+
"]": [30, 2, 2, 2, 2, 2, 30, 0],
|
|
140
|
+
"{": [14, 24, 24, 48, 24, 24, 14, 0],
|
|
141
|
+
"}": [28, 6, 6, 3, 6, 6, 28, 0],
|
|
142
|
+
"<": [3, 12, 48, 48, 12, 3, 0, 0],
|
|
143
|
+
">": [48, 12, 3, 3, 12, 48, 0, 0],
|
|
144
|
+
"=": [0, 63, 0, 63, 0, 0, 0, 0],
|
|
145
|
+
"#": [18, 18, 63, 18, 63, 18, 18, 0],
|
|
146
|
+
"%": [33, 34, 4, 12, 16, 32, 33, 0],
|
|
147
|
+
"&": [24, 36, 36, 25, 38, 36, 27, 0],
|
|
148
|
+
"@": [30, 33, 33, 47, 41, 32, 31, 0],
|
|
149
|
+
"^": [12, 18, 33, 0, 0, 0, 0, 0],
|
|
150
|
+
_: [0, 0, 0, 0, 0, 0, 63, 0],
|
|
151
|
+
"'": [12, 12, 24, 0, 0, 0, 0, 0],
|
|
152
|
+
'"': [36, 36, 0, 0, 0, 0, 0, 0],
|
|
153
|
+
"`": [24, 12, 0, 0, 0, 0, 0, 0],
|
|
154
|
+
"~": [0, 17, 42, 36, 0, 0, 0, 0],
|
|
155
|
+
"|": [12, 12, 12, 12, 12, 12, 12, 0],
|
|
156
|
+
$: [12, 30, 32, 30, 1, 30, 12, 0],
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Complete metadata object for the 6x8 font, used by the
|
|
161
|
+
* {@link FontBitmap} catalogue at module load time.
|
|
162
|
+
*
|
|
163
|
+
* @internal
|
|
164
|
+
*/
|
|
165
|
+
export const metadata = {
|
|
166
|
+
/** Catalogue name. */
|
|
167
|
+
name: FONT_6x8_NAME,
|
|
168
|
+
/** Cell width including spacing (6 + 1 = 7). */
|
|
169
|
+
width: FONT_6x8_WIDTH + FONT_6x8_SPACING,
|
|
170
|
+
/** Cell height (8). */
|
|
171
|
+
height: FONT_6x8_HEIGHT,
|
|
172
|
+
/** Inter-glyph spacing (1). */
|
|
173
|
+
spacing: FONT_6x8_SPACING,
|
|
174
|
+
/** Supported character string. */
|
|
175
|
+
chars: FONT_6x8_CHARS,
|
|
176
|
+
/** Glyph bitmask data. */
|
|
177
|
+
data: FONT_6x8,
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
export default FONT_6x8;
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Built-in 8x13 pixel bitmap font.
|
|
3
|
+
*
|
|
4
|
+
* Each character is a 8-pixel-wide, 13-pixel-tall glyph stored as an
|
|
5
|
+
* array of 13 integers. Each integer is a bitmask where bit 7
|
|
6
|
+
* (MSB) corresponds to the leftmost pixel and bit 0 to the rightmost.
|
|
7
|
+
*
|
|
8
|
+
* Tall, elegant glyphs for dialogue boxes and UI.
|
|
9
|
+
*
|
|
10
|
+
* Supported characters: uppercase A–Z, lowercase a–z, digits 0–9,
|
|
11
|
+
* and common punctuation / special characters.
|
|
12
|
+
*
|
|
13
|
+
* @category Fonts
|
|
14
|
+
* @since 0.2.0
|
|
15
|
+
* @internal
|
|
16
|
+
*
|
|
17
|
+
* @example Reading a glyph
|
|
18
|
+
* ```ts
|
|
19
|
+
* import FONT_8x13 from "./font_8x13";
|
|
20
|
+
*
|
|
21
|
+
* const letterA = FONT_8x13["A"];
|
|
22
|
+
* // 0, 0, 24, 36, 66, 66, 126, 66, 66, 66, 0, 0, 0
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/** Catalogue name used by {@link FontBitmap} to look up this font. */
|
|
27
|
+
export const FONT_8x13_NAME = "8x13";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Glyph width in pixels (excluding spacing).
|
|
31
|
+
* @defaultValue `8`
|
|
32
|
+
*/
|
|
33
|
+
export const FONT_8x13_WIDTH = 8;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Glyph height in pixels.
|
|
37
|
+
* @defaultValue `13`
|
|
38
|
+
*/
|
|
39
|
+
export const FONT_8x13_HEIGHT = 13;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Horizontal spacing between glyphs in pixels.
|
|
43
|
+
* @defaultValue `1`
|
|
44
|
+
*/
|
|
45
|
+
export const FONT_8x13_SPACING = 1;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Complete set of supported characters as a single string.
|
|
49
|
+
*/
|
|
50
|
+
export const FONT_8x13_CHARS =
|
|
51
|
+
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz !?.,:;-+*/\\()[]{}<>=#%&@^_'\"`~|$";
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Glyph data keyed by character.
|
|
55
|
+
*
|
|
56
|
+
* Each value is a 13-element `number[]` where each entry is a 8-bit
|
|
57
|
+
* row bitmask (bit 7 = leftmost pixel, bit 0 = rightmost pixel).
|
|
58
|
+
*
|
|
59
|
+
* @see {@link FontBitmap} — consumes this data for rendering
|
|
60
|
+
*/
|
|
61
|
+
export const FONT_8x13: Record<string, number[]> = {
|
|
62
|
+
"0": [0, 0, 60, 66, 70, 74, 82, 98, 66, 60, 0, 0, 0],
|
|
63
|
+
"1": [0, 0, 24, 56, 24, 24, 24, 24, 24, 126, 0, 0, 0],
|
|
64
|
+
"2": [0, 0, 60, 66, 2, 4, 8, 48, 64, 126, 0, 0, 0],
|
|
65
|
+
"3": [0, 0, 124, 2, 2, 60, 2, 2, 2, 124, 0, 0, 0],
|
|
66
|
+
"4": [0, 0, 4, 12, 20, 36, 68, 254, 4, 4, 0, 0, 0],
|
|
67
|
+
"5": [0, 0, 254, 128, 128, 252, 2, 2, 66, 60, 0, 0, 0],
|
|
68
|
+
"6": [0, 0, 62, 64, 128, 252, 130, 130, 66, 60, 0, 0, 0],
|
|
69
|
+
"7": [0, 0, 254, 2, 4, 8, 16, 32, 64, 128, 0, 0, 0],
|
|
70
|
+
"8": [0, 0, 60, 66, 66, 60, 66, 66, 66, 60, 0, 0, 0],
|
|
71
|
+
"9": [0, 0, 60, 66, 66, 62, 2, 2, 66, 60, 0, 0, 0],
|
|
72
|
+
A: [0, 0, 24, 36, 66, 66, 126, 66, 66, 66, 0, 0, 0],
|
|
73
|
+
B: [0, 0, 252, 66, 66, 124, 66, 66, 66, 252, 0, 0, 0],
|
|
74
|
+
C: [0, 0, 60, 66, 128, 128, 128, 128, 66, 60, 0, 0, 0],
|
|
75
|
+
D: [0, 0, 248, 68, 66, 66, 66, 66, 68, 248, 0, 0, 0],
|
|
76
|
+
E: [0, 0, 254, 128, 128, 252, 128, 128, 128, 254, 0, 0, 0],
|
|
77
|
+
F: [0, 0, 254, 128, 128, 252, 128, 128, 128, 128, 0, 0, 0],
|
|
78
|
+
G: [0, 0, 62, 64, 128, 142, 130, 130, 66, 62, 0, 0, 0],
|
|
79
|
+
H: [0, 0, 66, 66, 66, 126, 66, 66, 66, 66, 0, 0, 0],
|
|
80
|
+
I: [0, 0, 126, 24, 24, 24, 24, 24, 24, 126, 0, 0, 0],
|
|
81
|
+
J: [0, 0, 62, 8, 8, 8, 8, 136, 136, 112, 0, 0, 0],
|
|
82
|
+
K: [0, 0, 130, 132, 136, 144, 224, 144, 136, 134, 0, 0, 0],
|
|
83
|
+
L: [0, 0, 128, 128, 128, 128, 128, 128, 128, 254, 0, 0, 0],
|
|
84
|
+
M: [0, 0, 130, 198, 170, 146, 130, 130, 130, 130, 0, 0, 0],
|
|
85
|
+
N: [0, 0, 130, 194, 162, 146, 138, 134, 130, 130, 0, 0, 0],
|
|
86
|
+
O: [0, 0, 60, 66, 129, 129, 129, 129, 66, 60, 0, 0, 0],
|
|
87
|
+
P: [0, 0, 252, 130, 130, 252, 128, 128, 128, 128, 0, 0, 0],
|
|
88
|
+
Q: [0, 0, 60, 66, 129, 129, 129, 133, 70, 61, 0, 0, 0],
|
|
89
|
+
R: [0, 0, 252, 130, 130, 252, 144, 136, 132, 130, 0, 0, 0],
|
|
90
|
+
S: [0, 0, 62, 64, 128, 124, 2, 2, 2, 252, 0, 0, 0],
|
|
91
|
+
T: [0, 0, 254, 16, 16, 16, 16, 16, 16, 16, 0, 0, 0],
|
|
92
|
+
U: [0, 0, 130, 130, 130, 130, 130, 130, 68, 56, 0, 0, 0],
|
|
93
|
+
V: [0, 0, 130, 130, 68, 68, 40, 40, 16, 16, 0, 0, 0],
|
|
94
|
+
W: [0, 0, 130, 130, 130, 130, 146, 170, 198, 130, 0, 0, 0],
|
|
95
|
+
X: [0, 0, 130, 68, 40, 16, 16, 40, 68, 130, 0, 0, 0],
|
|
96
|
+
Y: [0, 0, 130, 68, 40, 16, 16, 16, 16, 16, 0, 0, 0],
|
|
97
|
+
Z: [0, 0, 254, 4, 8, 16, 16, 32, 64, 254, 0, 0, 0],
|
|
98
|
+
a: [0, 0, 0, 0, 60, 2, 62, 66, 66, 62, 0, 0, 0],
|
|
99
|
+
b: [0, 64, 64, 64, 124, 66, 66, 66, 66, 124, 0, 0, 0],
|
|
100
|
+
c: [0, 0, 0, 0, 62, 64, 128, 128, 64, 62, 0, 0, 0],
|
|
101
|
+
d: [0, 2, 2, 2, 62, 66, 66, 66, 66, 62, 0, 0, 0],
|
|
102
|
+
e: [0, 0, 0, 0, 60, 66, 126, 64, 64, 62, 0, 0, 0],
|
|
103
|
+
f: [0, 14, 16, 16, 60, 16, 16, 16, 16, 16, 0, 0, 0],
|
|
104
|
+
g: [0, 0, 0, 62, 66, 66, 66, 62, 2, 124, 0, 0, 0],
|
|
105
|
+
h: [0, 64, 64, 64, 124, 66, 66, 66, 66, 66, 0, 0, 0],
|
|
106
|
+
i: [0, 24, 24, 0, 56, 24, 24, 24, 24, 62, 0, 0, 0],
|
|
107
|
+
j: [0, 6, 6, 0, 6, 6, 6, 6, 70, 60, 0, 0, 0],
|
|
108
|
+
k: [0, 64, 64, 68, 72, 112, 120, 72, 68, 66, 0, 0, 0],
|
|
109
|
+
l: [0, 56, 24, 24, 24, 24, 24, 24, 24, 62, 0, 0, 0],
|
|
110
|
+
m: [0, 0, 0, 0, 218, 170, 170, 170, 130, 130, 0, 0, 0],
|
|
111
|
+
n: [0, 0, 0, 0, 124, 66, 66, 66, 66, 66, 0, 0, 0],
|
|
112
|
+
o: [0, 0, 0, 0, 60, 66, 129, 129, 66, 60, 0, 0, 0],
|
|
113
|
+
p: [0, 0, 0, 124, 66, 66, 66, 124, 64, 64, 64, 0, 0],
|
|
114
|
+
q: [0, 0, 0, 62, 66, 66, 66, 62, 2, 2, 2, 0, 0],
|
|
115
|
+
r: [0, 0, 0, 0, 94, 96, 64, 64, 64, 64, 0, 0, 0],
|
|
116
|
+
s: [0, 0, 0, 0, 62, 64, 60, 2, 2, 124, 0, 0, 0],
|
|
117
|
+
t: [0, 32, 32, 126, 32, 32, 32, 32, 34, 28, 0, 0, 0],
|
|
118
|
+
u: [0, 0, 0, 0, 66, 66, 66, 66, 70, 58, 0, 0, 0],
|
|
119
|
+
v: [0, 0, 0, 0, 66, 66, 36, 36, 24, 24, 0, 0, 0],
|
|
120
|
+
w: [0, 0, 0, 0, 130, 130, 146, 170, 198, 130, 0, 0, 0],
|
|
121
|
+
x: [0, 0, 0, 0, 66, 36, 24, 24, 36, 66, 0, 0, 0],
|
|
122
|
+
y: [0, 0, 0, 66, 66, 66, 66, 62, 2, 124, 0, 0, 0],
|
|
123
|
+
z: [0, 0, 0, 0, 254, 4, 8, 48, 64, 254, 0, 0, 0],
|
|
124
|
+
" ": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
125
|
+
"!": [0, 0, 24, 24, 24, 24, 24, 24, 0, 24, 0, 0, 0],
|
|
126
|
+
"?": [0, 0, 60, 66, 2, 4, 8, 8, 0, 8, 0, 0, 0],
|
|
127
|
+
".": [0, 0, 0, 0, 0, 0, 0, 0, 24, 24, 0, 0, 0],
|
|
128
|
+
",": [0, 0, 0, 0, 0, 0, 0, 24, 24, 48, 0, 0, 0],
|
|
129
|
+
":": [0, 0, 0, 0, 24, 24, 0, 24, 24, 0, 0, 0, 0],
|
|
130
|
+
";": [0, 0, 0, 0, 24, 24, 0, 24, 24, 48, 0, 0, 0],
|
|
131
|
+
"-": [0, 0, 0, 0, 0, 254, 0, 0, 0, 0, 0, 0, 0],
|
|
132
|
+
"+": [0, 0, 0, 16, 16, 254, 16, 16, 0, 0, 0, 0, 0],
|
|
133
|
+
"*": [0, 0, 66, 36, 254, 36, 66, 0, 0, 0, 0, 0, 0],
|
|
134
|
+
"/": [0, 2, 4, 8, 16, 16, 32, 64, 128, 0, 0, 0, 0],
|
|
135
|
+
"\\": [0, 128, 64, 32, 16, 16, 8, 4, 2, 0, 0, 0, 0],
|
|
136
|
+
"(": [0, 6, 8, 16, 32, 32, 32, 16, 8, 6, 0, 0, 0],
|
|
137
|
+
")": [0, 96, 16, 8, 4, 4, 4, 8, 16, 96, 0, 0, 0],
|
|
138
|
+
"[": [0, 120, 64, 64, 64, 64, 64, 64, 64, 120, 0, 0, 0],
|
|
139
|
+
"]": [0, 30, 2, 2, 2, 2, 2, 2, 2, 30, 0, 0, 0],
|
|
140
|
+
"{": [0, 30, 32, 32, 32, 64, 32, 32, 32, 30, 0, 0, 0],
|
|
141
|
+
"}": [0, 120, 4, 4, 4, 2, 4, 4, 4, 120, 0, 0, 0],
|
|
142
|
+
"<": [0, 0, 4, 8, 16, 32, 16, 8, 4, 0, 0, 0, 0],
|
|
143
|
+
">": [0, 0, 32, 16, 8, 4, 8, 16, 32, 0, 0, 0, 0],
|
|
144
|
+
"=": [0, 0, 0, 0, 254, 0, 254, 0, 0, 0, 0, 0, 0],
|
|
145
|
+
"#": [0, 36, 36, 254, 36, 36, 254, 36, 36, 0, 0, 0, 0],
|
|
146
|
+
"%": [0, 0, 194, 196, 8, 16, 32, 67, 131, 0, 0, 0, 0],
|
|
147
|
+
"&": [0, 0, 48, 72, 72, 48, 74, 68, 72, 54, 0, 0, 0],
|
|
148
|
+
"@": [0, 0, 60, 66, 157, 165, 165, 158, 64, 60, 0, 0, 0],
|
|
149
|
+
"^": [0, 24, 36, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
150
|
+
_: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 254, 0, 0],
|
|
151
|
+
"'": [0, 24, 24, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
152
|
+
'"': [0, 72, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
153
|
+
"`": [0, 48, 24, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
154
|
+
"~": [0, 0, 0, 70, 137, 144, 0, 0, 0, 0, 0, 0, 0],
|
|
155
|
+
"|": [0, 24, 24, 24, 24, 24, 24, 24, 24, 24, 0, 0, 0],
|
|
156
|
+
$: [0, 24, 62, 96, 96, 60, 6, 6, 124, 24, 0, 0, 0],
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Complete metadata object for the 8x13 font, used by the
|
|
161
|
+
* {@link FontBitmap} catalogue at module load time.
|
|
162
|
+
*
|
|
163
|
+
* @internal
|
|
164
|
+
*/
|
|
165
|
+
export const metadata = {
|
|
166
|
+
/** Catalogue name. */
|
|
167
|
+
name: FONT_8x13_NAME,
|
|
168
|
+
/** Cell width including spacing (8 + 1 = 9). */
|
|
169
|
+
width: FONT_8x13_WIDTH + FONT_8x13_SPACING,
|
|
170
|
+
/** Cell height (13). */
|
|
171
|
+
height: FONT_8x13_HEIGHT,
|
|
172
|
+
/** Inter-glyph spacing (1). */
|
|
173
|
+
spacing: FONT_8x13_SPACING,
|
|
174
|
+
/** Supported character string. */
|
|
175
|
+
chars: FONT_8x13_CHARS,
|
|
176
|
+
/** Glyph bitmask data. */
|
|
177
|
+
data: FONT_8x13,
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
export default FONT_8x13;
|