[office/calligra] libs/text/styles: KoCharacterStyle: Populate FontFamilies property on style load
Carl Schwan <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 1583d35b8f2e796b28c0e17d4e2f8f3f814994a8 by Carl Schwan, on behalf of Lokesh Sarkar.
Committed on 02/08/2026 at 16:38.
Pushed by carlschwan into branch 'master'.
KoCharacterStyle: Populate FontFamilies property on style load
Populate the FontFamilies property when applying a loaded FontFamily so
both properties remain consistent and text renders correctly after
reopening documents.
M +1 -0 libs/text/styles/KoCharacterStyle.cpp
https://invent.kde.org/office/calligra/-/commit/1583d35b8f2e796b28c0e17d4e2f8f3f814994a8
diff --git a/libs/text/styles/KoCharacterStyle.cpp b/libs/text/styles/KoCharacterStyle.cpp
index 273ac53780a..a1fc0d11209 100644
--- a/libs/text/styles/KoCharacterStyle.cpp
+++ b/libs/text/styles/KoCharacterStyle.cpp
@@ -463,6 +463,7 @@ void KoCharacterStyle::applyStyle(QTextCharFormat &format, bool emitSignal) cons
clearProperty.append(KoCharacterStyle::FontCharset);
}
format.setProperty(it.key(), it.value());
+ format.setProperty(QTextFormat::FontFamilies, QStringList(it.value().toString()));
} else {
format.setProperty(it.key(), it.value());
}