def description(description: str, text_buffer: Gtk.TextBuffer) -> None: if description: center = text_buffer.create_tag('description', justification=Gtk.Justification.CENTER) text_buffer.insert_with_tags(TextFormat.__pos(text_buffer), '\n\n' + description, center)
def article(article: str, text_buffer: Gtk.TextBuffer) -> None: if article: text_buffer.insert(TextFormat.__pos(text_buffer), '\n') paragraph = text_buffer.create_tag('paragraph') text_buffer.insert_with_tags(TextFormat.__pos(text_buffer), '\n' + article + '\n', paragraph)
def headline(headline: str, text_buffer: Gtk.TextBuffer) -> None: if headline: center = text_buffer.create_tag('center', justification=Gtk.Justification.CENTER, weight=Pango.Weight.BOLD) text_buffer.insert_with_tags(TextFormat.__pos(text_buffer), headline, center)