WHY_CPP
0.1
Overview
Getting started
Modules
Class List
File List
whycpp
include
whycpp
font.h
1
#pragma once
2
3
#include <whycpp/types.h>
4
#include <cstdint>
5
#include <vector>
6
14
struct
Glyph
{
15
static
const
i32 SIZE = 8;
// TODO: why do we fix font size?
16
uint8_t data[SIZE];
17
};
18
22
class
Font
{
23
public
:
24
explicit
Font
(std::vector<Glyph> glyphs);
25
uint8_t At(
char
ch, i32 row)
const
;
26
i32 GetHeight()
const
;
27
i32 GetWidth()
const
;
28
i32 GetSpacing()
const
;
29
30
private
:
31
i32 spacing = 1;
32
i32 width = 5;
33
i32 height = 7;
34
std::vector<Glyph> glyphs;
35
};
36
Font
Definition:
font.h:22
Glyph
Definition:
font.h:14
Generated by
1.8.11