|
Font Dealing 2 |
hossein
Member #7,312
June 2006
|
hi again |
Evert
Member #794
November 2000
|
man textprintf_ex said:
SEE ALSO Emphasis mine. |
miran
Member #2,407
June 2002
|
Is there a reason you can't reply in the first thread? -- |
hossein
Member #7,312
June 2006
|
hi evert |
Evert
Member #794
November 2000
|
Quote: Is there a reason you can't reply in the first thread? Saw this one first? Quote: main problem was that i coudlnt justify text as horizontal or vertical. What do you mean by justify horizontal or vertical? |
miran
Member #2,407
June 2002
|
Quote: Saw this one first? Sorry, I was talking to the OP. He started a thread with an almost identical question before, I gave him an answer (although not as detailed as yours), after which he proceeded to start this one. -- |
Evert
Member #794
November 2000
|
Ah, ok. |
Tobias Dammers
Member #2,604
August 2002
|
Quote:
hi evert
If you mean rendering text top-down instead of left-right: You can't, really. This would involve rotating characters, something which is not implemented in allegro's text api. void textout_vertical(BITMAP* bmp, const FONT* font, const char* str, int x, int y, int fg, int bg) { int w = text_length(font, str); int h = text_height(font); BITMAP* buf = create_bitmap(w, h); clear_to_color(buf, bitmap_mask_color(buf)); textout_ex(buf, font, str, 0, 0, fg, bg); pivot_sprite(bmp, buf, x, y, 0, h, itofix(64)); destroy_bitmap(buf); } This should do the trick. --- |
|