/* Returns CR_OK upon successful completion, an error code otherwise.  */
enum CRStatus cr_font_size_copy(CRFontSize *a_dst, CRFontSize *a_src)
/* Returns CR_OK upon successful completion, an error code otherwise.  */
enum CRStatus cr_font_size_copy(CRFontSize *a_dst, CRFontSize *a_src)
{
        g_return_val_if_fail (a_dst && a_src, CR_BAD_PARAM_ERROR);
        switch (a_src->type) {
        case PREDEFINED_ABSOLUTE_FONT_SIZE:
        case RELATIVE_FONT_SIZE:
        case INHERITED_FONT_SIZE:
                cr_font_size_clear (a_dst);
                memcpy (a_dst, a_src, sizeof (CRFontSize));
                break;
        case ABSOLUTE_FONT_SIZE:
                cr_font_size_clear (a_dst);
                cr_num_copy (&a_dst->value.absolute,
                             &a_src->value.absolute);
                a_dst->type = a_src->type;
                break;
        default:
                return CR_UNKNOWN_TYPE_ERROR;
        }
        return CR_OK;
}