From e33c1ff985cf6b08889de8401d87c342020dc7b3 Mon Sep 17 00:00:00 2001
From: Julian Smith <julian.smith@artifex.com>
Date: Fri, 2 Apr 2021 20:38:14 +0100
Subject: fonts work.

---
 src/odt.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/odt.c b/src/odt.c
index e1fe2e6..e1c92c0 100644
--- a/src/odt.c
+++ b/src/odt.c
@@ -81,14 +81,8 @@ static int extract_odt_style_append_definition(extract_alloc_t* alloc, extract_o
     outf("<style:text-properties style:font-name=\"%s\"", style->font_name);
     if (extract_odt_char_append_stringf(alloc, text, "<style:text-properties style:font-name=\"%s\"", style->font_name)) return -1;
     if (extract_odt_char_append_stringf(alloc, text, " fo:font-size=\"%ipt\"", style->font_size)) return -1;
-    if (style->font_bold)
-    {
-        if (extract_astring_cat(alloc, text, " fo:font-weight=\"bold\"")) return -1;
-    }
-    if (style->font_italic)
-    {
-        if (extract_astring_cat(alloc, text, " fo:font-style=\"italic\"")) return -1;
-    }
+    if (extract_odt_char_append_stringf(alloc, text, " fo:font-weight=\"%s\"", style->font_bold ? "bold" : "normal")) return -1;
+    if (extract_odt_char_append_stringf(alloc, text, " fo:font-style=\"%s\"", style->font_italic ? "italic" : "normal")) return -1;
     if (extract_astring_cat(alloc, text, " /></style:style>")) return -1;
     return 0;
 }
-- 
cgit v1.2.3