You can also load system fonts (such as Arial and Courrier) and draw using those. Allegro FONTs should still work if you use textout, textprintf, etc on them. However, converted Allegro FONTs will not work with these functions. You will have to use AllegroGL functions to work with AllegroGL FONTs.
|
Indicates that you don't really care how a font will be converted. AGL will pick the best format for you. Definition at line 591 of file alleggl.h. Referenced by allegro_gl_convert_allegro_font_ex(). |
|
Indicates that you want fonts to be converted to a bitmap format. Bitmaps are used to represent characters with one bit per pixel, and are usually very slow to draw, as they stall the 3D pipeline. Note that you can't scale, rotate or place text with a z coordinate if you use this style. A display list will be created.
Definition at line 602 of file alleggl.h. Referenced by allegro_gl_convert_allegro_font_ex(), allegro_gl_destroy_font(), and allegro_gl_printf(). |
|
Indicates that you want fonts to be converted to an outline format. Outlined mode is a vector-style font. Characters are represented by a set of polygons and lines. This style of fonts is fast to draw, and can be scaled, rotated, etc, since they are just vectors. A display list will be created.
Definition at line 614 of file alleggl.h. Referenced by allegro_gl_convert_allegro_font_ex(), allegro_gl_destroy_font(), allegro_gl_load_system_font(), and allegro_gl_printf(). |
|
Indicates that you want fonts to be converted to a texture format. Each character is represented by a textured quad. The texture is common for all characters of the same font, and it will automatically be uploaded to the video card when needed. Drawing text with this type of font is the fastest since only two triangles are needed per character. Textured text can also be scaled and rotated. A display list will be created.
Definition at line 626 of file alleggl.h. Referenced by allegro_gl_convert_allegro_font_ex(), allegro_gl_destroy_font(), and allegro_gl_printf(). |
|
Creates a font with bold characters. System fonts only.
|
|
Creates a font with black (strong bold) characters. System fonts only.
|
|
Creates a font with italicized characters. System fonts only.
|
|
Creates a font with underlined characters. System fonts only.
|
|
Creates a font with striked out characters. System fonts only.
|
|
Creates a font with anti-aliased characters. System fonts only. Anti-aliasing may not be available, and no error will be reported if such is the case.
|
|
Font generation mode. System fonts only. Indicates that you want outline system fonts to be generated using polygons.
|
|
Font generation mode. System fonts only. Indicates that you want outline system fonts to be generated using lines.
|
|
Prints a formatted string (printf style) on the screen.
Texturing must be enabled for this function to work with AGL_FONT_TYPE_TEXTURED fonts.
Remember to use The resulting size may not be what you expect. For bitmaped fonts, there is nothing you can do about this appart changing the font itself. Textured and Vector fonts are more flexible, in that you can use glScale to adjust the size of the characters. If you need to draw the text without the black backround, we suggest you set up a proper blending mode prior to drawing the text, such as:
Definition at line 123 of file aglf.c. References AGL_FONT_TYPE_BITMAP, AGL_FONT_TYPE_OUTLINE, AGL_FONT_TYPE_TEXTURED, allegro_gl_begin, and allegro_gl_end. |
|
Equivalent to:.
Definition at line 122 of file fontconv.c. References allegro_gl_convert_allegro_font_ex(), and allegro_gl_get_texture_format(). |
|
Converts a regular Allegro FONT to the AGL format for 3D display.
You can't convert an Allegro font to a vector font (AGL_FONT_TYPE_OUTLINE) as the logistics of such an operation are quite complex. The original font will NOT be modified. A valid OpenGL rendering context is required, so you may only call this function after a successful call to set_gfx_mode() with a valid OpenGL mode. You should destroy the font via allegro_gl_destroy_font() when you are done with it. For AGL_FONT_TYPE_TEXTURED fonts, glyphs in the font need to be mapped to OpenGL coordinates. The #scale factor ensures that you get the scaling you need. #scale reprents the number of pixels to be mapped to 1.0 OpenGL units. For allegro_gl_convert_font() to behave like AllegroGL 0.0.24 and earlier, you'll need to pass 16.0 as the #scale factor. Alternativaly, you can make all your fonts be 1.0 units high by using:
Definition at line 179 of file fontconv.c. References AGL_FONT_TYPE_BITMAP, AGL_FONT_TYPE_DONT_CARE, AGL_FONT_TYPE_OUTLINE, and AGL_FONT_TYPE_TEXTURED. Referenced by allegro_gl_convert_allegro_font(). |
|
Set the font generation mode for system fonts. Note: This function is deprecated and will be removed in a future version.
|
|
Short hand for aglf_load_system_font_ex(name, AGL_FONT_TYPE_OUTLINE, style, w, h, 0.0f, 32, 256). Note: This function is deprecated and will be removed in a future version.
Definition at line 439 of file aglf.c. References AGL_FONT_TYPE_OUTLINE, and allegro_gl_load_system_font_ex(). |
|
Loads a system font. Note: This function is deprecated and will be removed in a future version.
Definition at line 480 of file aglf.c. Referenced by allegro_gl_load_system_font(). |
|
Destroys the font.
You cannot use that font anymore after calling this function. It's safe to call this function with a NULL pointer; a note will be placed in allegro.log if DEBUGMODE was defined. If NULL is passed as the font to destroy, then this function returns immediately. Definition at line 525 of file aglf.c. References AGL_FONT_TYPE_BITMAP, AGL_FONT_TYPE_OUTLINE, and AGL_FONT_TYPE_TEXTURED. |
|
List the texture ID of all textures forming the specified font. The font specified must be an AllegroGL font. If ids is not NULL, then the ID numbers of all textures used by the font are written to the GLuint array pointed by ids. The size of that array is specified by the max_num_id parameter. This function will never write more than 'max_num_id' values in the ids array. If f is NULL, then zero is returned and the ids array is never touched. If the font does not contain any textures (because it is a bitmap or outline font, for example), then zero is returned.
|