al_get_text_width
int al_get_text_width(const ALLEGRO_FONT *f, const char *str)
Introduced in 5.0.0
Calculates the length of a string in a particular font, in pixels.
See also: al_get_ustr_width, al_get_font_line_height, al_get_text_dimensions
Examples: ex_display_options, ex_logo
Most helpful discussions:
- Allergo 5 - Text background color (1)
- 7Zip file of my game - Alien Cookbook
- TTF reinitialization bug after al_shutdown_allegro
- Textfield with variable size
- Text input using allegro 5
- Keyboard Interrupting on Mouse Positions?
- Scaled font print call?
- Rotate text with transformations
- Characters missing after al_get_text_width()
- NPC Conversation
Other recent discussions:
- [A5] New Line
- I need help with my text drawing function
- [A5] Writing Unicode to a file
- char in a for loop
- Crash getting text width when maximizing with D3D Driver
- characters missing after al_resize_display()
- Images from buffer
- Static variable headaches
- Allegro text and foreign characters
- [A5] TTF Fonts not caching correctly?