|
Font Dealing |
hossein
Member #7,312
June 2006
|
hi professional friends! |
miran
Member #2,407
June 2002
|
What's the problem exactly? Quote: i have faced a problem which i cant set size of my font in allegro programming. Plain Allegro supports only fixed size bitmap fonts. You can only change the size of those fonts in your bitmap editor. If you want to use TTF, then use a TTF addon library, such as AllegroFont or GlyphKeeper. Quote: nor i havent property to justify text as horizontal or vertical .... Text print functions in allegro take x and y coordinate parameters. Set them as you wish. There are also special functions for printing text right aligned and centre aligned. Read the manual and check the examples... -- |
Tobias Dammers
Member #2,604
August 2002
|
...and for y alignment, subtract the full (bottom-aligned) or half (centered) height of the font from the y coordinate you pass to the text output function, like so: textprintf_ex(bmp, font, x, y - text_height(font), makecol(255, 255, 255), -1, "Hello!"); Note that the bitmap fonts supported by allegro do not contain any baseline information, so you cannot easily align fonts along their baseline. --- |
|