Files
vb01/fontAsset.h
devZoGok f457c69d36 factored out texture GPU data loading
improved texture buffer and layer retrieval
using draw commands 1:1 with meshes
2026-07-08 12:08:03 +03:00

35 lines
586 B
C++

#ifndef FONT_ASSET_H
#define FONT_ASSET_H
#include "asset.h"
#include "util.h"
#include <vector>
#include <utility>
#include <ft2build.h>
#include FT_FREETYPE_H
namespace vb01{
class Texture;
struct FontAsset : public Asset{
struct Glyph{
u8 *data;
u32 advance;
int id, bufferId, layerId;
Vector2 size, bearing;
Glyph(int i, u8 *d, Vector2 s, Vector2 b, u32 adv, int bid, int lid) : id(i), data(d), size(s), bearing(b), advance(adv), bufferId(bid), layerId(lid){}
};
const Glyph& getGlyph(int);
FT_Face face;
std::vector<Glyph> glyphs;
};
}
#endif