Allegro Game Engine
- 渲染UTF8字体的时候,发现取字体是按偏移量的而不是第几个字
ALLEGRO_USTR_INFO info;
const ALLEGRO_USTR *ustr = al_ref_cstr(&info, str.c_str());
int words = al_ustr_length(ustr);
for (int i = 0; i < words; i++) {
int offset = al_ustr_offset(ustr, i);
int32_t codepoint = al_ustr_get(ustr, offset);
...