def make_default_style(self, default_style): """Make the default output style for the Kinship Report.""" f = FontStyle() f.set_size(16) f.set_type_face(FONT_SANS_SERIF) f.set_bold(1) p = ParagraphStyle() p.set_header_level(1) p.set_bottom_border(1) p.set_bottom_margin(ReportUtils.pt2cm(8)) p.set_font(f) p.set_alignment(PARA_ALIGN_CENTER) p.set_description(_("The style used for the title of the page.")) default_style.add_paragraph_style("KIN-Title", p) font = FontStyle() font.set_size(12) font.set_bold(True) p = ParagraphStyle() p.set_header_level(3) p.set_font(font) p.set_top_margin(ReportUtils.pt2cm(6)) p.set_description(_('The basic style used for sub-headings.')) default_style.add_paragraph_style("KIN-Subtitle", p) font = FontStyle() font.set_size(10) p = ParagraphStyle() p.set_font(font) p.set_left_margin(0.5) p.set_description(_('The basic style used for the text display.')) default_style.add_paragraph_style("KIN-Normal", p)
def make_default_style(self, default_style): #Paragraph Styles font = FontStyle() font.set_type_face(FONT_SANS_SERIF) font.set_size(16) font.set_bold(True) para = ParagraphStyle() para.set_font(font) para.set_alignment(PARA_ALIGN_CENTER) para.set_description(_("The style used for the report title.")) default_style.add_paragraph_style('REC-Title', para) font = FontStyle() font.set_type_face(FONT_SANS_SERIF) font.set_size(12) font.set_bold(True) para = ParagraphStyle() para.set_font(font) para.set_alignment(PARA_ALIGN_CENTER) para.set_bottom_border(True) para.set_bottom_margin(ReportUtils.pt2cm(8)) para.set_description(_("The style used for the report subtitle.")) default_style.add_paragraph_style('REC-Subtitle', para) font = FontStyle() font.set_size(12) font.set_bold(True) para = ParagraphStyle() para.set_font(font) para.set_top_margin(ReportUtils.pt2cm(6)) para.set_description(_('The style used for headings.')) default_style.add_paragraph_style('REC-Heading', para) font = FontStyle() font.set_size(10) para = ParagraphStyle() para.set_font(font) para.set_left_margin(0.5) para.set_description(_('The basic style used for the text display.')) default_style.add_paragraph_style('REC-Normal', para) font = FontStyle() font.set_size(8) para = ParagraphStyle() para.set_font(font) para.set_alignment(PARA_ALIGN_CENTER) para.set_top_border(True) para.set_top_margin(ReportUtils.pt2cm(8)) para.set_description(_('The style used for the footer.')) default_style.add_paragraph_style('REC-Footer', para)
def make_default_style(self, default_style): """Make the default output style for the Descendant Report.""" f = FontStyle() f.set_size(12) f.set_type_face(FONT_SANS_SERIF) f.set_bold(1) p = ParagraphStyle() p.set_header_level(1) p.set_bottom_border(1) p.set_top_margin(ReportUtils.pt2cm(3)) p.set_bottom_margin(ReportUtils.pt2cm(3)) p.set_font(f) p.set_alignment(PARA_ALIGN_CENTER) p.set_description(_("The style used for the title of the page.")) default_style.add_paragraph_style("DR-Title", p) f = FontStyle() f.set_size(10) for i in range(1, 33): p = ParagraphStyle() p.set_font(f) p.set_top_margin(ReportUtils.pt2cm(f.get_size() * 0.125)) p.set_bottom_margin(ReportUtils.pt2cm(f.get_size() * 0.125)) p.set_first_indent(-0.5) p.set_left_margin(min(10.0, float(i - 0.5))) p.set_description( _("The style used for the " "level %d display.") % i) default_style.add_paragraph_style("DR-Level%d" % min(i, 32), p) p = ParagraphStyle() p.set_font(f) p.set_top_margin(ReportUtils.pt2cm(f.get_size() * 0.125)) p.set_bottom_margin(ReportUtils.pt2cm(f.get_size() * 0.125)) p.set_left_margin(min(10.0, float(i - 0.5))) p.set_description( _("The style used for the " "spouse level %d display.") % i) default_style.add_paragraph_style("DR-Spouse%d" % min(i, 32), p)
def make_default_style(self, default_style): """Make the default output style for the Detailed Ancestral Report""" font = FontStyle() font.set(face=FONT_SANS_SERIF, size=16, bold=1) para = ParagraphStyle() para.set_font(font) para.set_header_level(1) para.set_top_margin(0.25) para.set_bottom_margin(0.25) para.set_alignment(PARA_ALIGN_CENTER) para.set_description(_('The style used for the title of the page.')) default_style.add_paragraph_style("DDR-Title", para) font = FontStyle() font.set(face=FONT_SANS_SERIF, size=14, italic=1) para = ParagraphStyle() para.set_font(font) para.set_header_level(2) para.set_top_margin(0.25) para.set_bottom_margin(0.25) para.set_description(_('The style used for the generation header.')) default_style.add_paragraph_style("DDR-Generation", para) font = FontStyle() font.set(face=FONT_SANS_SERIF, size=10, italic=0, bold=1) para = ParagraphStyle() para.set_font(font) para.set_left_margin(1.5) # in centimeters para.set_top_margin(0.25) para.set_bottom_margin(0.25) para.set_description(_('The style used for the children list title.')) default_style.add_paragraph_style("DDR-ChildTitle", para) font = FontStyle() font.set(size=10) para = ParagraphStyle() para.set_font(font) para.set(first_indent=-0.75, lmargin=2.25) para.set_top_margin(0.125) para.set_bottom_margin(0.125) para.set_description(_('The style used for the children list.')) default_style.add_paragraph_style("DDR-ChildList", para) font = FontStyle() font.set(face=FONT_SANS_SERIF, size=10, italic=0, bold=1) para = ParagraphStyle() para.set_font(font) para.set(first_indent=0.0, lmargin=1.5) para.set_top_margin(0.25) para.set_bottom_margin(0.25) default_style.add_paragraph_style("DDR-NoteHeader", para) para = ParagraphStyle() para.set(lmargin=1.5) para.set_top_margin(0.25) para.set_bottom_margin(0.25) para.set_description(_('The basic style used for the text display.')) default_style.add_paragraph_style("DDR-Entry", para) para = ParagraphStyle() para.set(first_indent=-1.5, lmargin=1.5) para.set_top_margin(0.25) para.set_bottom_margin(0.25) para.set_description(_('The style used for the first personal entry.')) default_style.add_paragraph_style("DDR-First-Entry", para) font = FontStyle() font.set(size=10, face=FONT_SANS_SERIF, bold=1) para = ParagraphStyle() para.set_font(font) para.set(first_indent=0.0, lmargin=1.5) para.set_top_margin(0.25) para.set_bottom_margin(0.25) para.set_description( _('The style used for the More About header and ' 'for headers of mates.')) default_style.add_paragraph_style("DDR-MoreHeader", para) font = FontStyle() font.set(face=FONT_SERIF, size=10) para = ParagraphStyle() para.set_font(font) para.set(first_indent=0.0, lmargin=1.5) para.set_top_margin(0.25) para.set_bottom_margin(0.25) para.set_description(_('The style used for additional detail data.')) default_style.add_paragraph_style("DDR-MoreDetails", para) endnotes.add_endnote_styles(default_style)