File: fontconv_8c.html

package info (click to toggle)
allegro4.4 2%3A4.4.2-5
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 19,920 kB
  • ctags: 39,951
  • sloc: ansic: 164,225; asm: 17,620; cpp: 3,848; objc: 1,687; sh: 1,131; python: 676; pascal: 179; makefile: 48; perl: 29; lisp: 1
file content (221 lines) | stat: -rw-r--r-- 15,752 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>AllegroGL: fontconv.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="alleggl.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.3 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">AllegroGL&#160;<span id="projectnumber">0.4.4</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('fontconv_8c.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#define-members">Defines</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<h1>fontconv.c File Reference</h1>  </div>
</div>
<div class="contents">

<p>Allegro FONT conversion routines.  
<a href="#_details">More...</a></p>
<div class="textblock"><code>#include &lt;math.h&gt;</code><br/>
<code>#include &lt;string.h&gt;</code><br/>
<code>#include &lt;stdio.h&gt;</code><br/>
<code>#include &lt;allegro.h&gt;</code><br/>
<code>#include &lt;allegro/internal/aintern.h&gt;</code><br/>
<code>#include &quot;alleggl.h&quot;</code><br/>
<code>#include &quot;allglint.h&quot;</code><br/>
<code>#include &lt;GL/glu.h&gt;</code><br/>
</div>
<p><a href="fontconv_8c_source.html">Go to the source code of this file.</a></p>
<h2><a name="define-members"></a>
Defines</h2>
<ul>
<li><a class="anchor" id="a09462782acac95f9a6da67adf659ed6e"></a><!-- doxytag: member="fontconv.c::PREFIX_I" ref="a09462782acac95f9a6da67adf659ed6e" args="" -->
#define <b>PREFIX_I</b>&#160;&#160;&#160;&quot;agl-font INFO: &quot;
<li><a class="anchor" id="ad8bfd440530d371de892a20efd3bbc2a"></a><!-- doxytag: member="fontconv.c::PREFIX_W" ref="ad8bfd440530d371de892a20efd3bbc2a" args="" -->
#define <b>PREFIX_W</b>&#160;&#160;&#160;&quot;agl-font WARNING: &quot;
<li><a class="anchor" id="a8c04b6ea901068c5cc4020e9a18c0cbe"></a><!-- doxytag: member="fontconv.c::PREFIX_E" ref="a8c04b6ea901068c5cc4020e9a18c0cbe" args="" -->
#define <b>PREFIX_E</b>&#160;&#160;&#160;&quot;agl-font ERROR: &quot;
<li><a class="anchor" id="ae1bb43a44b73e97ebeb31e58c54571c3"></a><!-- doxytag: member="fontconv.c::FONT_CHARACTER_SPACING" ref="ae1bb43a44b73e97ebeb31e58c54571c3" args="" -->
#define <b>FONT_CHARACTER_SPACING</b>&#160;&#160;&#160;2
<li><a class="anchor" id="af64acedbf0cce356cfd2c02117866f98"></a><!-- doxytag: member="fontconv.c::MIN_TEXTURE_SIZE" ref="af64acedbf0cce356cfd2c02117866f98" args="" -->
#define <b>MIN_TEXTURE_SIZE</b>&#160;&#160;&#160;2
<li><a class="anchor" id="ab9b4a0bc6e67dd57e9f391734e1bb586"></a><!-- doxytag: member="fontconv.c::NUM_TEXTURE_SIZE" ref="ab9b4a0bc6e67dd57e9f391734e1bb586" args="" -->
#define <b>NUM_TEXTURE_SIZE</b>&#160;&#160;&#160;13
</ul>
<h2><a name="typedef-members"></a>
Typedefs</h2>
<ul>
<li><a class="anchor" id="af22e3cdc9f6f5d49eaa80b2bf721aeb7"></a><!-- doxytag: member="fontconv.c::texture_size" ref="af22e3cdc9f6f5d49eaa80b2bf721aeb7" args="" -->
typedef struct texture_size <b>texture_size</b>
</ul>
<h2><a name="func-members"></a>
Functions</h2>
<ul>
<li><a class="anchor" id="aa15c1548e54e4e50f3263213b0b229db"></a><!-- doxytag: member="fontconv.c::agl_get_font_height" ref="aa15c1548e54e4e50f3263213b0b229db" args="(AL_CONST FONT *f)" -->
static int <b>agl_get_font_height</b> (AL_CONST FONT *f)
<li><a class="anchor" id="a629fd684092573c2697fcaff416f4346"></a><!-- doxytag: member="fontconv.c::agl_char_length" ref="a629fd684092573c2697fcaff416f4346" args="(const FONT *f, int ch)" -->
static int <b>agl_char_length</b> (const FONT *f, int ch)
<li><a class="anchor" id="a7a3fa16dbc64481648bca78845115877"></a><!-- doxytag: member="fontconv.c::agl_text_length" ref="a7a3fa16dbc64481648bca78845115877" args="(const FONT *f, const char *str)" -->
static int <b>agl_text_length</b> (const FONT *f, const char *str)
<li><a class="anchor" id="aa82e4a568af2311ec0c49f1f56aa5616"></a><!-- doxytag: member="fontconv.c::agl_get_font_ranges" ref="aa82e4a568af2311ec0c49f1f56aa5616" args="(FONT *f)" -->
static int <b>agl_get_font_ranges</b> (FONT *f)
<li><a class="anchor" id="ac9ba5027911c93eab24f968909354410"></a><!-- doxytag: member="fontconv.c::agl_get_font_range_begin" ref="ac9ba5027911c93eab24f968909354410" args="(FONT *f, int range)" -->
static int <b>agl_get_font_range_begin</b> (FONT *f, int range)
<li><a class="anchor" id="a88a4997cb342e2fa287edc6094e5298b"></a><!-- doxytag: member="fontconv.c::agl_get_font_range_end" ref="a88a4997cb342e2fa287edc6094e5298b" args="(FONT *f, int range)" -->
static int <b>agl_get_font_range_end</b> (FONT *f, int range)
<li><a class="anchor" id="a422957a01e23de62aa3f69829b8df0d2"></a><!-- doxytag: member="fontconv.c::agl_extract_font_range" ref="a422957a01e23de62aa3f69829b8df0d2" args="(FONT *f, int start, int end)" -->
static FONT * <b>agl_extract_font_range</b> (FONT *f, int start, int end)
<li><a class="anchor" id="a6b61e9412580c11a885852c142f189be"></a><!-- doxytag: member="fontconv.c::agl_merge_fonts" ref="a6b61e9412580c11a885852c142f189be" args="(FONT *f1, FONT *f2)" -->
static FONT * <b>agl_merge_fonts</b> (FONT *f1, FONT *f2)
<li><a class="anchor" id="ad55165710a2f4aaa8e153c0c9a6a7228"></a><!-- doxytag: member="fontconv.c::agl_transpose_font" ref="ad55165710a2f4aaa8e153c0c9a6a7228" args="(FONT *f, int drange)" -->
static int <b>agl_transpose_font</b> (FONT *f, int drange)
<li><a class="anchor" id="a1fb5c0b2b75e70c145ddc381665c0857"></a><!-- doxytag: member="fontconv.c::aglf_convert_allegro_font_to_bitmap" ref="a1fb5c0b2b75e70c145ddc381665c0857" args="(FONT_AGL_DATA *dest, FONT *f, void *src, int *height)" -->
static void <b>aglf_convert_allegro_font_to_bitmap</b> (FONT_AGL_DATA *dest, FONT *f, void *src, int *height)
<li><a class="anchor" id="abbf4fa765bd07d4dd9684ea7a28af379"></a><!-- doxytag: member="fontconv.c::aglf_convert_allegro_font_to_texture" ref="abbf4fa765bd07d4dd9684ea7a28af379" args="(FONT_AGL_DATA **dest, FONT *f, void *src, int *height, float scale, GLint format)" -->
static void <b>aglf_convert_allegro_font_to_texture</b> (FONT_AGL_DATA **dest, FONT *f, void *src, int *height, float scale, GLint format)
<li><a class="anchor" id="af31c943e03054737bd19c04b10ca9828"></a><!-- doxytag: member="fontconv.c::aglf_upload_texture" ref="af31c943e03054737bd19c04b10ca9828" args="(BITMAP *bmp, GLint format, int has_alpha)" -->
static GLuint <b>aglf_upload_texture</b> (BITMAP *bmp, GLint format, int has_alpha)
<li><a class="anchor" id="a7f0a461482a8291e8842adc3e79a290b"></a><!-- doxytag: member="fontconv.c::aglf_check_texture" ref="a7f0a461482a8291e8842adc3e79a290b" args="(BITMAP *bmp, GLint format, int has_alpha)" -->
static int <b>aglf_check_texture</b> (BITMAP *bmp, GLint format, int has_alpha)
<li><a class="anchor" id="a08b49ec5fa60bdbf621c3486915361be"></a><!-- doxytag: member="fontconv.c::look_for_texture" ref="a08b49ec5fa60bdbf621c3486915361be" args="(int beg, int end, AGL_GLYPH *glyphs, int max_w, int max_h, int total_area, GLint format, int has_alpha)" -->
static BITMAP * <b>look_for_texture</b> (int beg, int end, AGL_GLYPH *glyphs, int max_w, int max_h, int total_area, GLint format, int has_alpha)
<li><a class="anchor" id="aaa4c166e687a92f215e0ab7095e27aac"></a><!-- doxytag: member="fontconv.c::iroundf" ref="aaa4c166e687a92f215e0ab7095e27aac" args="(float v)" -->
static int <b>iroundf</b> (float v)
<li><a class="anchor" id="a474b448488f4701514fd6f754b672b1a"></a><!-- doxytag: member="fontconv.c::agl_char_length_fractional" ref="a474b448488f4701514fd6f754b672b1a" args="(const FONT *f, int ch)" -->
static float <b>agl_char_length_fractional</b> (const FONT *f, int ch)
<li><a class="anchor" id="adfff29753a63507f93c45bd24f79bbc6"></a><!-- doxytag: member="fontconv.c::create_textured_font_call_lists" ref="adfff29753a63507f93c45bd24f79bbc6" args="(AGL_GLYPH *coords, int max, BITMAP *bmp, float scale, int *height)" -->
static int <b>create_textured_font_call_lists</b> (AGL_GLYPH *coords, int max, BITMAP *bmp, float scale, int *height)
<li><a class="anchor" id="adad249ceaa35db1cd403e0a8cfa5dc8d"></a><!-- doxytag: member="fontconv.c::copy_glyph_range" ref="adad249ceaa35db1cd403e0a8cfa5dc8d" args="(FONT_AGL_DATA *fad, int start, int end, int *height)" -->
static FONT_AGL_DATA * <b>copy_glyph_range</b> (FONT_AGL_DATA *fad, int start, int end, int *height)
<li>FONT * <a class="el" href="group__Text.html#gad01388c5188ae09628284aa2425acae9">allegro_gl_convert_allegro_font</a> (FONT *f, int type, float scale)
<dl class="el"><dd class="mdescRight">Equivalent to:  <a href="group__Text.html#gad01388c5188ae09628284aa2425acae9"></a><br/></dl><li>FONT * <a class="el" href="group__Text.html#ga4986ec80f1a3362e47f7669461fef414">allegro_gl_convert_allegro_font_ex</a> (FONT *f, int type, float scale, GLint format)
<dl class="el"><dd class="mdescRight">Converts a regular Allegro FONT to the AGL format for 3D display.  <a href="group__Text.html#ga4986ec80f1a3362e47f7669461fef414"></a><br/></dl><li><a class="anchor" id="a4537fb9c1ec2237c4d490fa85eab5ce4"></a><!-- doxytag: member="fontconv.c::sort_glyphs" ref="a4537fb9c1ec2237c4d490fa85eab5ce4" args="(const void *c1, const void *c2)" -->
static int <b>sort_glyphs</b> (const void *c1, const void *c2)
<li><a class="anchor" id="af93f61e1684426ced5628c640ea3ed35"></a><!-- doxytag: member="fontconv.c::unsort_glyphs" ref="af93f61e1684426ced5628c640ea3ed35" args="(const void *c1, const void *c2)" -->
static int <b>unsort_glyphs</b> (const void *c1, const void *c2)
<li><a class="anchor" id="a335b98405cb2c496b38e0eebdc0af23f"></a><!-- doxytag: member="fontconv.c::sort_textures" ref="a335b98405cb2c496b38e0eebdc0af23f" args="(const void *c1, const void *c2)" -->
static int <b>sort_textures</b> (const void *c1, const void *c2)
<li><a class="anchor" id="aa11b923a92e0416c689110a0c3b14c60"></a><!-- doxytag: member="fontconv.c::aglf_sort_out_glyphs" ref="aa11b923a92e0416c689110a0c3b14c60" args="(BITMAP *bmp, AGL_GLYPH *glyphs, const int beg, const int end)" -->
static int <b>aglf_sort_out_glyphs</b> (BITMAP *bmp, AGL_GLYPH *glyphs, const int beg, const int end)
<li><a class="anchor" id="a8560c09b64a9f8278c012cab130bc81a"></a><!-- doxytag: member="fontconv.c::split_font" ref="a8560c09b64a9f8278c012cab130bc81a" args="(FONT *f, void *source, void **dest1, void **dest2)" -->
static int <b>split_font</b> (FONT *f, void *source, void **dest1, void **dest2)
<li><a class="anchor" id="ac3b845779133af8ea9927b9cd49e7b1c"></a><!-- doxytag: member="fontconv.c::destroy_split_font" ref="ac3b845779133af8ea9927b9cd49e7b1c" args="(FONT *f, union mixed_ptr range1, union mixed_ptr range2)" -->
static void <b>destroy_split_font</b> (FONT *f, union mixed_ptr range1, union mixed_ptr range2)
<li><a class="anchor" id="a3a67de20985510babecf44d317a50c83"></a><!-- doxytag: member="fontconv.c::do_crop_font_range" ref="a3a67de20985510babecf44d317a50c83" args="(FONT *f, AGL_GLYPH *glyphs, int beg, int end)" -->
static int <b>do_crop_font_range</b> (FONT *f, AGL_GLYPH *glyphs, int beg, int end)
<li><a class="anchor" id="af0d26dfdc5cb9055136b3bbbc708c73d"></a><!-- doxytag: member="fontconv.c::crop_font_range" ref="af0d26dfdc5cb9055136b3bbbc708c73d" args="(FONT *f, void *src, int beg, int end, AGL_GLYPH *glyphs, int *net_area, int *gross_area, int *max_w, int *max_h)" -->
static int <b>crop_font_range</b> (FONT *f, void *src, int beg, int end, AGL_GLYPH *glyphs, int *net_area, int *gross_area, int *max_w, int *max_h)
<li><a class="anchor" id="a669d0b604bef3c4ab668ce73fb8288ce"></a><!-- doxytag: member="fontconv.c::dummy_render_char" ref="a669d0b604bef3c4ab668ce73fb8288ce" args="(AL_CONST FONT *f, int ch, int fg, int bg, BITMAP *bmp, int x, int y)" -->
static int <b>dummy_render_char</b> (AL_CONST FONT *f, int ch, int fg, int bg, BITMAP *bmp, int x, int y)
<li><a class="anchor" id="abf8002d012eb4e8d2870c069479257b5"></a><!-- doxytag: member="fontconv.c::draw_glyphs" ref="abf8002d012eb4e8d2870c069479257b5" args="(BITMAP *bmp, FONT *f, GLint format, int beg, int end, AGL_GLYPH *glyphs)" -->
static int <b>draw_glyphs</b> (BITMAP *bmp, FONT *f, GLint format, int beg, int end, AGL_GLYPH *glyphs)
</ul>
<h2><a name="var-members"></a>
Variables</h2>
<ul>
<li>FONT_VTABLE <b>_agl_font_vtable</b>
<li><a class="anchor" id="a639ff5b4222f196b5b82a388b80139ba"></a><!-- doxytag: member="fontconv.c::font_vtable_agl" ref="a639ff5b4222f196b5b82a388b80139ba" args="" -->
FONT_VTABLE * <b>font_vtable_agl</b> = &amp;_agl_font_vtable
</ul>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Allegro FONT conversion routines. </p>
<p>Notes: - Depends on the Allegro's FONT structure remaining intact. Bugs: - Bitmapped font support is flakey at best. </p>

<p>Definition in file <a class="el" href="fontconv_8c_source.html">fontconv.c</a>.</p>
</div><hr/><h2>Variable Documentation</h2>
<a class="anchor" id="aa4f15f892f647d55ff3e0c6c67ef95eb"></a><!-- doxytag: member="fontconv.c::_agl_font_vtable" ref="aa4f15f892f647d55ff3e0c6c67ef95eb" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">FONT_VTABLE _agl_font_vtable</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Initial value:</b><div class="fragment"><pre class="fragment"> {
    agl_get_font_height,
    agl_char_length,
    agl_text_length,
    NULL, 
    NULL, 
    <a class="code" href="group__Text.html#gabcbdd9810f7254cdb105f987ae1e557f" title="void allegro_gl_destroy_font(FONT *usefont)">allegro_gl_destroy_font</a>,
    agl_get_font_ranges,
    agl_get_font_range_begin,
    agl_get_font_range_end,
    agl_extract_font_range,
    agl_merge_fonts,

    agl_transpose_font

}
</pre></div>
<p>Definition at line <a class="el" href="fontconv_8c_source.html#l00064">64</a> of file <a class="el" href="fontconv_8c_source.html">fontconv.c</a>.</p>

</div>
</div>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="fontconv_8c.html">fontconv.c</a>      </li>
      <li class="footer">Generated on Thu May 19 2011 23:20:20 for AllegroGL by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
    </ul>
  </div>

</body>
</html>