|
Cyrillic font problem |
Bob Bobosky
Member #7,151
April 2006
|
Hello Please , help me with cyrillic font ( ttf , not pcx file ) I try use Glyph Keeper:
But it show me like this: Test: ? ? ? ? ? ? ? ? ? http://www.hostfornet.net/vasilevs/test.png Help |
DanielH
Member #934
January 2001
|
Have you tried different unicode formats besides U_ASCII? |
Bob Bobosky
Member #7,151
April 2006
|
Yes but nothing :-( By the way . I see your posts in forum. Can we talk online by ICQ etc. ? |
DanielH
Member #934
January 2001
|
Sorry, but I don't use ICQ. I don't use GlyphKeeper, so I'm not sure if this is relevant. From this website: U_CURRENT is set to U_UTF8 void utextout( BITMAP *bmp, const FONT *f, const char *s, int x, int y, int color ) { char buf[ 512 ]; if ( need_uconvert( s, U_ASCII, U_CURRENT ) ) { uconvert( s, U_ASCII, buf, U_CURRENT, sizeof( buf ) ); } else { strcpy( buf, s ); } textout( bmp, f, buf, x, y, color ); } Using GK, would you need to convert it like this function would? |
gnolam
Member #2,030
March 2002
|
U_ASCII just plain won't work, that much is obvious. My instinct is "unconverted text", but if Daniel's advice doesn't help: please attach the font you're using - I've come across Cyrillic TTF fonts that were mapped to weird (KOI-8 or similar) encodings instead of standard Unicode... -- |
Bob Bobosky
Member #7,151
April 2006
|
Thank you guys ! show_text(char *text,int *text_size_wh,int *text_size_hi,int *text_wh,int *text_hi,int color){ if ( need_uconvert( text , U_ASCII , U_UTF8 ) ){ uconvert( text , U_ASCII , buf , U_UTF8 , sizeof( buf ) ); text=&buf; } gk_rend_set_size_pixels(rend,text_size_wh,text_size_hi); gk_rend_set_text_alpha(rend,255); gk_rend_set_text_color(rend,colors[color].r,colors[color].g,colors[color].b); gk_render_line_utf8(buffer,rend,text ,text_wh,text_hi); } But i correct font by font editor :-) |
|