/* Returns the serialized form of #CRFontSize. The returned string has to bee freed using g_free().  */
gchar* cr_font_size_to_string(CRFontSize *a_this)
/* Returns the serialized form of #CRFontSize. The returned string has to bee freed using g_free().  */
gchar* cr_font_size_to_string(CRFontSize *a_this)
{
        gchar *str = NULL;
        if (!a_this) {
                str = g_strdup ("NULL");
                g_return_val_if_fail (str, NULL);
                return str;
        }
        switch (a_this->type) {
        case PREDEFINED_ABSOLUTE_FONT_SIZE:
                str = g_strdup (cr_predefined_absolute_font_size_to_string
                                (a_this->value.predefined));
                break;
        case ABSOLUTE_FONT_SIZE:
                str = cr_num_to_string (&a_this->value.absolute);
                break;
        case RELATIVE_FONT_SIZE:
                str = g_strdup (cr_relative_font_size_to_string
                                (a_this->value.relative));
                break;
        case INHERITED_FONT_SIZE:
                str = g_strdup ("inherit");
                break;
        default:
                break;
        }
        return str;
}