def make_default_style(self, default_style): """Make the default output style for the Kinship Report.""" font = FontStyle() font.set_size(16) font.set_type_face(FONT_SANS_SERIF) font.set_bold(1) para = ParagraphStyle() para.set_header_level(1) para.set_bottom_border(1) para.set_bottom_margin(utils.pt2cm(8)) para.set_font(font) para.set_alignment(PARA_ALIGN_CENTER) para.set_description(_("The style used for the title of the page.")) default_style.add_paragraph_style("KIN-Title", para) font = FontStyle() font.set_size(12) font.set_bold(True) para = ParagraphStyle() para.set_header_level(3) para.set_font(font) para.set_top_margin(utils.pt2cm(6)) para.set_description(_('The basic style used for sub-headings.')) default_style.add_paragraph_style("KIN-Subtitle", 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("KIN-Normal", para)
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 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_description(_("The style used for the 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(utils.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(utils.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.""" fstyle = FontStyle() fstyle.set_size(12) fstyle.set_type_face(FONT_SANS_SERIF) fstyle.set_bold(1) pstyle = ParagraphStyle() pstyle.set_header_level(1) pstyle.set_bottom_border(1) pstyle.set_top_margin(utils.pt2cm(3)) pstyle.set_bottom_margin(utils.pt2cm(3)) pstyle.set_font(fstyle) pstyle.set_alignment(PARA_ALIGN_CENTER) pstyle.set_description(_("The style used for the title of the page.")) default_style.add_paragraph_style("DR-Title", pstyle) fstyle = FontStyle() fstyle.set_size(10) for i in range(1, 33): pstyle = ParagraphStyle() pstyle.set_font(fstyle) pstyle.set_top_margin(utils.pt2cm(fstyle.get_size() * 0.125)) pstyle.set_bottom_margin(utils.pt2cm(fstyle.get_size() * 0.125)) pstyle.set_first_indent(-0.5) pstyle.set_left_margin(min(10.0, float(i - 0.5))) pstyle.set_description( _("The style used for the level %d display.") % i) default_style.add_paragraph_style("DR-Level%d" % min(i, 32), pstyle) pstyle = ParagraphStyle() pstyle.set_font(fstyle) pstyle.set_top_margin(utils.pt2cm(fstyle.get_size() * 0.125)) pstyle.set_bottom_margin(utils.pt2cm(fstyle.get_size() * 0.125)) pstyle.set_left_margin(min(10.0, float(i - 0.5))) pstyle.set_description( _("The style used for the spouse level %d display.") % i) default_style.add_paragraph_style("DR-Spouse%d" % min(i, 32), pstyle)
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("DAR-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("DAR-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.0) # 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("DAR-ChildTitle", para) font = FontStyle() font.set(size=10) para = ParagraphStyle() para.set_font(font) para.set(first_indent=-0.75, lmargin=1.75) para.set_top_margin(0.25) para.set_bottom_margin(0.25) para.set_description(_('The style used for the children list.')) default_style.add_paragraph_style("DAR-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.0) para.set_top_margin(0.25) para.set_bottom_margin(0.25) default_style.add_paragraph_style("DAR-NoteHeader", para) para = ParagraphStyle() para.set(lmargin=1.0) 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("DAR-Entry", para) para = ParagraphStyle() para.set(first_indent=-1.0, lmargin=1.0) 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("DAR-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.0) para.set_top_margin(0.25) para.set_bottom_margin(0.25) para.set_description(_('The style used for the More About header.')) default_style.add_paragraph_style("DAR-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.0) 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("DAR-MoreDetails", para) endnotes.add_endnote_styles(default_style)