GoldFish Engine
Quite simple and lightweight game engine
Loading...
Searching...
No Matches
font.h
Go to the documentation of this file.
1
7#ifndef __GF_TYPE_FONT_H__
8#define __GF_TYPE_FONT_H__
9
10#include <gf_pre.h>
11#include <gf_macro.h>
12
13#ifdef GF_EXPOSE_FONT
14typedef struct gf_font_bbox_t gf_font_bbox_t;
15typedef struct gf_font_glyph_t gf_font_glyph_t;
16typedef struct gf_font_t gf_font_t;
17
18/* External library */
19
20/* Engine */
21#include <gf_type/texture.h>
22
23/* Standard */
24
39GF_DECLARE_TYPE(font_store, {
40 int glyph_index;
41 int line_index;
42 unsigned char* buffer;
43});
44
62GF_DECLARE_TYPE(font_bbox, {
63 int width;
64 int height;
65 int x;
66 int y;
67});
68
89GF_DECLARE_TYPE(font_glyph, {
90 int code;
91 gf_texture_t* texture;
92 int bpl;
94 int dwidth[2];
95});
96
111GF_DECLARE_TYPE(font, {
113 int count;
115});
116#else
117typedef void gf_font_glyph_t;
118typedef void gf_font_bbox_t;
119typedef void gf_font_t;
120#endif
121
122#endif
#define GF_DECLARE_TYPE(n, b)
Macro to define engine type shorter.
Definition gf_macro.h:180
Required headers before anything.
Bounding box.
Definition font.h:67
Glyph.
Definition font.h:95
Font.
Definition font.h:115
gf_font_glyph_t ** glyph
Glyph data.
Definition font.h:115
int count
Glyph count.
Definition font.h:115
gf_font_bbox_t bbox
Bounding box.
Definition font.h:115
Texture.
Definition texture.h:49
Type definitions related to texture.