Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » alternative way text output problem....

This thread is locked; no one can reply to it. rss feed Print
alternative way text output problem....
visual00
Member #15,194
June 2013

hi guys

i'm south korean allegro user

i am not good at english.

Sorry, but I don't speak English well.

(please understand even if you can't understand me clearly)

=============================================================================
umm.. allegro5 text output function is my country string
dont no text output

so alternative way windows api text output function use

by the way

new problem outbreak...

#SelectExpand
1#include <allegro5/allegro.h> 2#include <allegro5/allegro_native_dialog.h> 3#include <allegro5/allegro_ttf.h> 4#include <allegro5/allegro_font.h> 5#include <allegro5/allegro_windows.h> 6 7#define ScreenWidth 800 8#define ScreenHeight 600 9 10int main(int argc, char **argv) 11{ 12 ALLEGRO_DISPLAY *display = NULL; 13 14 HDC hdc; 15 PAINTSTRUCT ps; 16 HWND hWnd; 17 18 TCHAR *str= TEXT("Englist,한글"); 19 20 al_init(); 21 al_set_new_display_flags(ALLEGRO_WINDOWED); 22 display = al_create_display(ScreenWidth,ScreenHeight); 23 al_set_window_position(display,200,100); 24 al_set_window_title(display,"String Output Test"); 25 26 hWnd = al_get_win_window_handle(display); 27 hdc = GetDC(hWnd); 28 29 al_clear_to_color(al_map_rgb(255,255,255)); 30 31 TextOut(hdc,0,0,str,lstrlen(str)); 32 33 MessageBox(hWnd,"window","stop",MB_OK); 34 35 al_flip_display(); 36 al_rest(3.0); 37 ReleaseDC(hWnd,hdc); 38 al_destroy_display(display); 39 return 0; 40}

program result...

1.
9m8e.jpg

2.
{"name":"c0ul.jpg","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/0\/603308ab8e06ebc46663c8d4df064fde.jpg","w":353,"h":140,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/0\/603308ab8e06ebc46663c8d4df064fde"}c0ul.jpg

3.
{"name":"2ffv.jpg","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/8\/284d15b34a15229754405bbe687c194b.jpg","w":423,"h":159,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/8\/284d15b34a15229754405bbe687c194b"}2ffv.jpg

oh.. text output problem help..please..???

beoran
Member #12,636
March 2011

Allegro's font output works and can make korean so you don't need this solution. Please look back in the other thread, I found the problem. The font you used does not have Korean characters in it.

Go to: