Exemplo n.º 1
0
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);
}
Exemplo n.º 2
0
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;
}