'To change default header style of all <para> and drawstring.'

@api.onchange('font')
def _onchange_font_name(self):

    def _change_header(header, font):
        '    Replace    default    fontname    use    in    header    and    setfont    tag    '
        default_para = re.sub('fontName.?=.?".*"', ('fontName="%s"' % font), header)
        return re.sub('(<setFont.?name.?=.?)(".*?")(.)', ('\\g<1>"%s"\\g<3>' % font), default_para)
    if self.font:
        fontname = self.font.name
        self.rml_header = _change_header(self.rml_header, fontname)
        self.rml_header2 = _change_header(self.rml_header2, fontname)
        self.rml_header3 = _change_header(self.rml_header3, fontname)
