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)
- Keyboard Interrupting on Mouse Positions?
- Scaled font print call?
- Rotate text with transformations
- Characters missing after al_get_text_width()
- NPC Conversation
- [A5] New Line
- I need help with my text drawing function
- [A5] Writing Unicode to a file
- char in a for loop
Other recent discussions:
- 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?
- Drawing TTF Font takes 20% CPU
- [A5] Breaking lines when drawing text
- [al_draw_text] really slow
- Slowness when drawing fonts