diff --git a/include/report.cpp b/include/report.cpp index ba87bc4d2..4e78700d5 100755 --- a/include/report.cpp +++ b/include/report.cpp @@ -389,16 +389,17 @@ void TReport_section::compute_print_font(const TReport_font& oldfont, const TRep const TReport_font& TReport_section::print_font() const { - const TReport_font* f = _print_font; - if (f == NULL) - { - TReport_section* father = father_section(); - if (father == NULL) - f = &_report.print_font(); - else - f = &father->print_font(); - } - return *f; + if (_print_font != NULL && _report.use_printer_font()) + return *_print_font; + + if (_font != NULL) + return *_font; + + TReport_section* father = father_section(); + if (father != NULL) + return father->print_font(); + + return _report.print_font(); } const TString& TReport_section::prescript() const @@ -1017,7 +1018,11 @@ const TReport_font& TReport_field::font() const const TReport_font& TReport_field::print_font() const { - return _print_font != NULL ? *_print_font : _section->print_font(); + if (_print_font != NULL) + return *_print_font; + if (_font != NULL) + return *_font; + return _section->print_font(); } void TReport_field::compute_print_font(const TReport_font& oldfont, const TReport_font& newfont)