rsvg_text_render_text (RsvgDrawingCtx * ctx, const char *text, gdouble * x, gdouble * y)
{
    PangoContext *context;
    PangoLayout *layout;
    PangoLayoutIter *iter;
    RsvgState *state;
    gint w, h, baseline;

    state = rsvg_current_state (ctx);

    /* Do not render the text if the font size is zero. See bug #581491. */
    if (state->font_size.length == 0)
        return;

    context = ctx->render->create_pango_context (ctx);
    layout = rsvg_text_create_layout (ctx, state, text, context);
    pango_layout_get_size (layout, &w, &h);
    iter = pango_layout_get_iter (layout);
    baseline = pango_layout_iter_get_baseline (iter) / (double)PANGO_SCALE;
    pango_layout_iter_free (iter);
    ctx->render->render_pango_layout (ctx, layout, *x, *y - baseline);
    *x += w / (double)PANGO_SCALE;
    g_object_unref (layout);
    g_object_unref (context);
}
rsvg_text_render_text (RsvgDrawingCtx * ctx, const char *text, gdouble * x, gdouble * y)
{
    PangoContext *context;
    PangoLayout *layout;
    PangoLayoutIter *iter;
    RsvgState *state;
    gint w, h, baseline;

    state = rsvg_current_state (ctx);

     
    if (state->font_size.length == 0)
        return;

    context = ctx->render->create_pango_context (ctx);
    layout = rsvg_text_create_layout (ctx, state, text, context);
    pango_layout_get_size (layout, &w, &h);
    iter = pango_layout_get_iter (layout);
    baseline = pango_layout_iter_get_baseline (iter) / (double)PANGO_SCALE;
    pango_layout_iter_free (iter);
    ctx->render->render_pango_layout (ctx, layout, *x, *y - baseline);
    *x += w / (double)PANGO_SCALE;
    g_object_unref (layout);
    g_object_unref (context);
}