void gfx_font_adapter::translate_storage(void* storage, scalar x, scalar y)
{
    gfx_serialized_scanlines_adaptor_bin* sd = (gfx_serialized_scanlines_adaptor_bin*)storage;
    int ox = sd->x();
    int oy = sd->y();
    sd->setX(ox + SCALAR_TO_INT(Ceil(x)));
    sd->setY(oy + SCALAR_TO_INT(Ceil(y)));
}
ps_bool PICAPI ps_get_font_info(ps_context* ctx, ps_font_info* info)
{
    if (!picasso::is_valid_system_device()) {
        global_status = STATUS_DEVICE_ERROR;
        return False;
    }

    if (!ctx || !info) {
        global_status = STATUS_INVALID_ARGUMENT;
        return False;
    }

    if (create_device_font(ctx)) {
        info->size = SCALAR_TO_FLT(ctx->fonts->current_font()->height());
        info->ascent = SCALAR_TO_FLT(ctx->fonts->current_font()->ascent());
        info->descent = SCALAR_TO_FLT(ctx->fonts->current_font()->descent());
        info->leading = SCALAR_TO_FLT(ctx->fonts->current_font()->leading());
        info->unitsEM = SCALAR_TO_INT(ctx->fonts->current_font()->units_per_em());
        global_status = STATUS_SUCCEED;
        return True;
    }

    global_status = STATUS_UNKNOWN_ERROR;
    return False;
}