Re: [AD] character length in given font

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


From: "Bernd Becker" <munin@xxxxxxxxxx>
Subject: [AD] character length in given font


> Hi,
>
> as I wanted to implement text wrapping functionality into my tooltip
> class I needed a function which returns the size of the letter in the font
> used.

Can you not use text_length?

int text_length(const FONT *f, const char *str);

Returns the length (in pixels) of a string in the specified font.
  See also: text_height.



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/