Created attachment 198824 [details] Example file from Word 2016 Attached example file has a paragraph of text with "Times New (W1)" font. In Word this font is replaced with plain TNR, but not in Writer, so the text is rendered as a bit longer. 1. Open attached file in Word and Writer -> text is 3 lines in Word, but 3 and a bit more in Writer Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 43fc662520e5488cbeadd6eb60a24374a837dca4 CPU threads: 14; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Raster; VCL: win Locale: hu-HU (hu_HU); UI: en-US Calc: threaded Seems to work in 24.2 and older, started in 24.8 with: https://git.libreoffice.org/core/+/91dc75b03defdc2faefde1822588dcc96ab9b145%5E%21 author Miklos Vajna <vmiklos@collabora.com> Fri Jul 19 16:11:33 2024 +0200 committer Xisco Fauli <xiscofauli@libreoffice.org> Tue Jul 23 14:25:15 2024 +0200 Related: tdf#162072 DOCX import: handle font family for characters Adding CC to: Miklos Vajna
Created attachment 198825 [details] The document in Word and Writer master
Created attachment 198826 [details] The font substitution dialog in Word
This is an RTF file and the above commit was only tested with DOCX. Seems the untested "no font family is provided" case for RTF goes wrong and sets a font family, even if the RTF tokenizer wasn't updated to provide something like that. Let me see what can I do here.
Miklos Vajna committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/7af540ddeb42a3a733f258a77e17c7ebb16d4571 tdf#164904 RTF import: fix unexpected CharFontFamily It will be available in 25.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.