diff options
author | Julian Smith <julian.smith@artifex.com> | 2021-04-02 20:38:14 +0100 |
---|---|---|
committer | Julian Smith <julian.smith@artifex.com> | 2021-04-02 20:38:14 +0100 |
commit | e33c1ff985cf6b08889de8401d87c342020dc7b3 (patch) | |
tree | 01ce8ad65716e207aff36ea62b1adf7cfde1d75d | |
parent | 74699203c7f70a6d7e3aebde49fa78299f30002f (diff) |
fonts work.wip-odt
-rw-r--r-- | src/odt.c | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -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; } |