1
0
Fork 0

Font: move Glyph to it's own header.

This commit is contained in:
Henrik Hautakoski 2020-01-05 23:40:25 +01:00
parent 5c4eea4ae1
commit 2dd1187ff2
No known key found for this signature in database
GPG key ID: 96765B12FEAC4745
7 changed files with 31 additions and 19 deletions

View file

@ -6,9 +6,9 @@
#include <vector>
#include <string>
#include <Spectre/Math/Vector4.h>
#include <Spectre/Math/Vector2.h>
#include <Spectre/Graphics/Texture.h>
#include <Spectre/Graphics/Font/Glyph.h>
namespace sp {
@ -24,16 +24,6 @@ public :
std::string name;
};
struct Glyph {
vec2b size; // Width, Height of bounding box.
vec2b offset; // Offset from cursor where the box begins.
unsigned char advance;
//vec4u tex_coords;
vec2u texture_origin;
const Texture* texture; // Texture atlas.
};
Font();
~Font();

View file

@ -0,0 +1,21 @@
#ifndef SPECTRE_GRAPHICS_FONT_GLYPH_H
#define SPECTRE_GRAPHICS_FONT_GLYPH_H
#include <Spectre/Math/Vector2.h>
#include <Spectre/Graphics/Texture.h>
namespace sp {
struct Glyph {
vec2b size; // Width, Height of bounding box.
vec2b offset; // Offset from cursor where the box begins.
unsigned char advance;
vec2u texture_origin;
const Texture* texture; // Texture atlas.
};
} // namespace sp
#endif // SPECTRE_GRAPHICS_FONT_GLYPH_H