static void draw_string_part(float x, float y, const char *s, const char *e) { int c; ui_begin_text(ctx); while (s < e) { s += fz_chartorune(&c, s); x += ui_draw_character(ctx, c, x, y + ui.baseline); } ui_end_text(ctx); }
float ui_draw_string(fz_context *ctx, float x, float y, const char *str) { int ucs; ui_begin_text(ctx); while (*str) { str += fz_chartorune(&ucs, str); x += ui_draw_character(ctx, ucs, x, y); } ui_end_text(ctx); return x; }
float ui_measure_string(fz_context *ctx, char *str) { int ucs; float x = 0; ui_begin_text(ctx); while (*str) { str += fz_chartorune(&ucs, str); x += ui_measure_character(ctx, ucs); } ui_end_text(ctx); return x; }