2
2
#define __al_included_allegro5_allegro_font_h
3
3
4
4
#include "allegro5/allegro.h"
5
- #include "allegro5/internal/aintern_list.h"
6
5
7
6
#if (defined ALLEGRO_MINGW32 ) || (defined ALLEGRO_MSVC ) || (defined ALLEGRO_BCC32 )
8
7
#ifndef ALLEGRO_STATICLINK
47
46
/* Type: ALLEGRO_FONT
48
47
*/
49
48
typedef struct ALLEGRO_FONT ALLEGRO_FONT ;
49
+ #if defined(ALLEGRO_UNSTABLE ) || defined(ALLEGRO_INTERNAL_UNSTABLE ) || defined(ALLEGRO_FONT_SRC )
50
+
50
51
/* Type: ALLEGRO_GLYPH
51
52
*/
52
53
typedef struct ALLEGRO_GLYPH ALLEGRO_GLYPH ;
53
- typedef struct ALLEGRO_FONT_VTABLE ALLEGRO_FONT_VTABLE ;
54
-
55
- struct ALLEGRO_FONT
56
- {
57
- void * data ;
58
- int height ;
59
- ALLEGRO_FONT * fallback ;
60
- ALLEGRO_FONT_VTABLE * vtable ;
61
- _AL_LIST_ITEM * dtor_item ;
62
- };
63
54
64
55
struct ALLEGRO_GLYPH
65
56
{
@@ -73,30 +64,7 @@ struct ALLEGRO_GLYPH
73
64
int offset_y ;
74
65
int advance ;
75
66
};
76
-
77
- /* text- and font-related stuff */
78
- struct ALLEGRO_FONT_VTABLE
79
- {
80
- ALLEGRO_FONT_METHOD (int , font_height , (const ALLEGRO_FONT * f ));
81
- ALLEGRO_FONT_METHOD (int , font_ascent , (const ALLEGRO_FONT * f ));
82
- ALLEGRO_FONT_METHOD (int , font_descent , (const ALLEGRO_FONT * f ));
83
- ALLEGRO_FONT_METHOD (int , char_length , (const ALLEGRO_FONT * f , int ch ));
84
- ALLEGRO_FONT_METHOD (int , text_length , (const ALLEGRO_FONT * f , const ALLEGRO_USTR * text ));
85
- ALLEGRO_FONT_METHOD (int , render_char , (const ALLEGRO_FONT * f , ALLEGRO_COLOR color , int ch , float x , float y ));
86
- ALLEGRO_FONT_METHOD (int , render , (const ALLEGRO_FONT * f , ALLEGRO_COLOR color , const ALLEGRO_USTR * text , float x , float y ));
87
- ALLEGRO_FONT_METHOD (void , destroy , (ALLEGRO_FONT * f ));
88
- ALLEGRO_FONT_METHOD (void , get_text_dimensions , (const ALLEGRO_FONT * f ,
89
- const ALLEGRO_USTR * text , int * bbx , int * bby , int * bbw , int * bbh ));
90
- ALLEGRO_FONT_METHOD (int , get_font_ranges , (ALLEGRO_FONT * font ,
91
- int ranges_count , int * ranges ));
92
-
93
- ALLEGRO_FONT_METHOD (bool , get_glyph_dimensions , (const ALLEGRO_FONT * f ,
94
- int codepoint , int * bbx , int * bby , int * bbw , int * bbh ));
95
- ALLEGRO_FONT_METHOD (int , get_glyph_advance , (const ALLEGRO_FONT * font ,
96
- int codepoint1 , int codepoint2 ));
97
-
98
- ALLEGRO_FONT_METHOD (bool , get_glyph , (const ALLEGRO_FONT * f , int prev_codepoint , int codepoint , ALLEGRO_GLYPH * glyph ));
99
- };
67
+ #endif
100
68
101
69
enum {
102
70
ALLEGRO_NO_KERNING = -1 ,
@@ -147,7 +115,9 @@ ALLEGRO_FONT_FUNC(bool, al_get_glyph_dimensions, (const ALLEGRO_FONT *f,
147
115
int codepoint , int * bbx , int * bby , int * bbw , int * bbh ));
148
116
ALLEGRO_FONT_FUNC (int , al_get_glyph_advance , (const ALLEGRO_FONT * f ,
149
117
int codepoint1 , int codepoint2 ));
118
+ #if defined(ALLEGRO_UNSTABLE ) || defined(ALLEGRO_INTERNAL_UNSTABLE ) || defined(ALLEGRO_FONT_SRC )
150
119
ALLEGRO_FONT_FUNC (bool , al_get_glyph , (const ALLEGRO_FONT * f , int prev_codepoint , int codepoint , ALLEGRO_GLYPH * glyph ));
120
+ #endif
151
121
152
122
ALLEGRO_FONT_FUNC (void , al_draw_multiline_text , (const ALLEGRO_FONT * font , ALLEGRO_COLOR color , float x , float y , float max_width , float line_height , int flags , const char * text ));
153
123
ALLEGRO_FONT_FUNC (void , al_draw_multiline_textf , (const ALLEGRO_FONT * font , ALLEGRO_COLOR color , float x , float y , float max_width , float line_height , int flags , const char * format , ...));
0 commit comments