text-item: Use struct font_style instead of individual fields.
[pspp] / src / output / spv / spv-output.c
index cb4964a7f1d7bdf9d4c33b6fd661e366769684dd..00b3dead4729416faa1ca19cb28a63314a850ced 100644 (file)
@@ -37,16 +37,11 @@ spv_text_submit (const struct spv_item *in)
                                       SETTINGS_VALUE_SHOW_DEFAULT);
   char *label = in->label ? xstrdup (in->label) : NULL;
   struct text_item *item = text_item_create_nocopy (type, text, label);
-  const struct font_style *font = value->font_style;
-  if (font)
+
+  if (value->font_style)
     {
-      item->bold = font->bold;
-      item->italic = font->italic;
-      item->underline = font->underline;
-      item->markup = font->markup;
-      if (font->typeface)
-        item->typeface = xstrdup (font->typeface);
-      item->size = font->size;
+      font_style_uninit (&item->style);
+      font_style_copy (NULL, &item->style, value->font_style);
     }
   text_item_submit (item);
 }