Gang Tang <ta...@...> writes:

> 
> Dear all,
> 
> I am ready to use agar in my project,  I am in China,
> and want to render Chinese using msyh.ttf (which is a
> beautiful vector Chinese font file released by Microsoft).
> 
> At this moment, I am working under debian lenny linux
> with UTF8 as default system environment code. here I
> want to ask:
> 
> 1. How to load an existing ttf file from file system in agar?
>     which API?
> 2. Does agar support UTF8 char code? I know freetype
>     support it.
> 
> emm, that's all this time. Anybody can help me?
> 
> Thank you!
> 

This problem is caused by a minor bug in core/string_compat.c
                        case 3:
                                ucs[j]  = (Uint32)(s[i]   & 0x3f) << 12;  //bug 
                                ucs[j] |= (Uint32)(s[++i] & 0x3f) << 6;
                                ucs[j] |= (Uint32)(s[++i] & 0x3f);
                                break;
just change 0x3f to 0x0f.



_______________________________________________
Agar mailing list
[email protected]
http://libagar.org/lists.html

Reply via email to