Text formatting lost on save/reopen (t-span issue?)
<!-- See our full bug reporting guidelines at https://inkscape.org/contribute/report-bugs/ Writing a good bug report will ensure we'll be able to help efficiently. 🙂 --> #### Summary: <!-- Summarize the issue/suggestion concisely: --> Text formatting is being lost and/or altered when saving and reopening a file. May be related to: inkscape/inbox#11971 #### Steps to reproduce: <!-- Describe what you did (step-by-step) so we can reproduce: --> In an Inkscape SVG file: 1. Create a text box that includes multiple text styles (e.g. bold in the middle of normal, like this). 2. Save as an Inkscape SVG file, close Inkscape and re-open the SVG file. 3. Sometimes nothing happens. Results 4a. Sometimes all of the formatted text in the entire file will go from having bold/italics and the usual "Fill checked, Stroke not checked" options in the Fill and Stroke menu to having BOTH fill AND stroke checked (see image 1 for broken vs fixed text). To fix it, I have to select text in every text box and un-check the Stroke checkbox. The first image shows what it looks like when I open the file (left side), and then I have to fix it everywhere (right side). 4b. Sometimes, instead of the stroke option being checked, all of the formatted text will actually be switched to an entirely different font in the middle of a text box (see second image; that was bold and matched the rest of the text in that textbox before saving/reopening). 4c. Sometimes the text alignment of the text box changes - some or all of the text boxes will become centered even though the dropdown show left-justified. To fix this you need to to first change away from left-justified (nothing happens if you try to select the already-selected left-justification box), and then switch back. I often need to switch to full justification (not just centered or right justified) before the left justification button will actually do anything. Very weird, but when it happens it is at least consistent. It doesn't happen every time, but once it happens the text changes will persist through all future open/save/close/reopen cycles. On a complicated file (like what I am currently working on), once this happens I just leave everything broken and fix it all as the final pass before I export images to print formats (PDF, PNG). This happens: - when I fully close an SVG file and re-open it. This has happened with older versions of Inkscape, it does not happen if I save the file while Inkscape is running, or if I minimize the window. - with multi-page and single page SVG files. - intermittently (well, according to my repro steps), but more often than not. - does not seem to matter what font(s) I have used. - Creating and opening on Win10 - Inkscape 1.3 (0e150ed6c4, 2023-07-21) currently, but has happened in previous versions. - Saving either to a network drive or local hard drive. #### What happened? After saving and reopening a file, the text formatting is lost or completely changed. #### What should have happened? The formatting for text should remain the same between saving and reopening of a file. Searching around, it seems like there might be something about loading the file that is confusing the Inkscape SVG file with plain SVG and coming up with issues, but I am only saving, working on, and re-opening these files with Inkscape so I don't think there should be any formatting problems being introduced with different interpretations of the Inkscape SVG format. Grouping text boxes, text-id, and t-span tags? There is something VERY weird going on with the text-vs-tspan font-family tags. The text box was created with font 1. The t-span tag shows the correct font 1, in the screenshot this is Overpass. BUT, the text-id tag above the t-span shows the incorrect font 2 (in the screenshot, Manic Germanic). The incorrect font is used with other items on the page, including a separate textbox used as a heading for this section of text. The two text boxes (one with Font 1 and bold-formatted text, one with Font 2) are grouped in the file so that they can be moved as a unit. Maybe that is why the text-id is being carried over? Sample attachments: ![InkscapeBoldTextProblems](/uploads/7cb1df40b12708e6dd6826c52212a749/InkscapeBoldTextProblems.png){width=520 height=105} ![InkscapeTextBox_2](/uploads/3fcdf0a31436bd08eec2f9b10b78489c/InkscapeTextBox_2.png){width=129 height=21} ![2026-03-25_14_46_56-XML_Editor](/uploads/971d055f429f5be511c5a3bc9e499282/2026-03-25_14_46_56-XML_Editor.png){width=762 height=269} ![2026-03-25_14_47_23-XML_Editor](/uploads/39bae2ce4f92f9c7baccb5e27898ba44/2026-03-25_14_47_23-XML_Editor.png){width=771 height=137} ![2026-03-25_14_46_14-XML_Editor](/uploads/5a46103a31d28e3b40b7ba8cc34a0630/2026-03-25_14_46_14-XML_Editor.png){width=758 height=224} #### Version info Inkscape 1.3 (0e150ed6c4, 2023-07-21) <!-- Open 'Help > About' and click on the little bug icon in the bottom right corner that copies the debug information to your clipboard. For command line users, run 'inkscape --debug-info'. For Inkscape 1.0.2 and older, please manually add the Inkscape Version and Operating System Version. The Inkscape version is listed in the About dialog. For command line users, run 'inkscape -V' Paste the information in the empty space between the apostrophes below: --> ``` ``` <!-- ❤️ Thank you for filling in a new bug report, we appreciate the help! ❤️ Please be patient while we try to find the time to look into your issue. Remember that Inkscape is developed by volunteers in their spare time, we'll try our best to respond to all reports. --> <!-- Please be careful when/after writing # for example in logs, code, or versions of linux - use inline code span - single backticks (`) before and after it, like this - `#1618` - use multi-line code block - triple backticks (```) to fence/enclose console logs - attach long logs as a text file. -->
issue