libxlsxwriter/src/styles.c in fast_excel-0.2.3 vs libxlsxwriter/src/styles.c in fast_excel-0.2.5

- old
+ new

@@ -1,11 +1,11 @@ /***************************************************************************** * styles - A library for creating Excel XLSX styles files. * * Used in conjunction with the libxlsxwriter library. * - * Copyright 2014-2017, John McNamara, jmcnamara@cpan.org. See LICENSE.txt. + * Copyright 2014-2018, John McNamara, jmcnamara@cpan.org. See LICENSE.txt. * */ #include "xlsxwriter/xmlwriter.h" #include "xlsxwriter/styles.h" @@ -151,17 +151,17 @@ /* * Write the <sz> element. */ STATIC void -_write_font_size(lxw_styles *self, uint16_t font_size) +_write_font_size(lxw_styles *self, double font_size) { struct xml_attribute_list attributes; struct xml_attribute *attribute; LXW_INIT_ATTRIBUTES(); - LXW_PUSH_ATTRIBUTES_INT("val", font_size); + LXW_PUSH_ATTRIBUTES_DBL("val", font_size); lxw_xml_empty_tag(self->file, "sz", &attributes); LXW_FREE_ATTRIBUTES(); } @@ -335,10 +335,10 @@ _write_vert_align(self, "superscript"); if (format->font_script == LXW_FONT_SUBSCRIPT) _write_vert_align(self, "subscript"); - if (format->font_size) + if (format->font_size > 0.0) _write_font_size(self, format->font_size); if (format->theme) _write_font_color_theme(self, format->theme); else if (format->font_color != LXW_COLOR_UNSET)