> characters > 0x2e80 for example have a width of two monospace chars. These > are mostly Chinese, Japanese and Korean. Basically, for monospaced font in > Unicode, you can have non-spacing, single-width or double-width characters or > ligatures.
I know about the double-width characters. Fortunately, it's not my case anyhow. > You can use this: > > /* OD: returns the number of Unicode chars in the UTF-8 string */ > FL_EXPORT int fl_utf_nb_char(const unsigned char *buf, int len); OK. I have string with some length (m = strlen(s);) and I have n - quantity of characters which I can print. I can calculate k = fl_utf_nb_char(s, m); If k <= n then no problem : fl_draw(s,x,y); Otherwise? In cycle decrease the source text by one byte and check for length, yes? _______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
