I am working on a small application on Linux using gtk and python. A part of the application contains a notepad and text in the notepad can be modified with font styles, font sizes, and colors. I would like to save the contents of the text view to a file with all the modifications and access the modified data when needed. I could save the text into a text file but I need to save its attributes. The next time if we access the file and view it on the text buffer, the textbuffer should contain text as well as the modifications(font style, color, size, family).
Hoping for a positive response. Thank you.