summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrei Golubev <andrei.golubev@qt.io>2021-11-30 16:46:13 +0100
committerAndrei Golubev <andrei.golubev@qt.io>2021-12-03 12:57:39 +0000
commit08b0a63a0ffd5e3b4aeb0a789663d5200fd217bb (patch)
tree107cd790f0041c14dc2d545f3103453e19f4a7c1
parent020191d2ef513b2dd925f27890229dba4ca338e3 (diff)
QFontDatabase: unify relevant documentation pieces
addApplicationFont and addApplicationFontFromData basically do the same thing (with one reading the data from a file and another reading it directly from QByteArray) The documentation is not quite identical, so fix that by using \include magic of qdoc As a drive-by, remove outdated \note within addApplicationFont() description Fixes: QTBUG-98752 Pick-to: 5.15 6.2 Change-Id: I29738e7411d241c26a4b2e1dd91d0af867fcc111 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
-rw-r--r--src/gui/text/qfontdatabase.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index 8f98d9defc..887fb8eb2e 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -2196,13 +2196,12 @@ bool QFontDatabasePrivate::isApplicationFont(const QString &fileName)
with removeApplicationFont() or to retrieve the list of family names contained
in the font.
+//! [add-application-font-doc]
The function returns -1 if the font could not be loaded.
Currently only TrueType fonts, TrueType font collections, and OpenType fonts are
supported.
-
- \note Adding application fonts on Unix/X11 platforms without fontconfig is
- currently not supported.
+//! [add-application-font-doc]
\sa addApplicationFontFromData(), applicationFontFamilies(), removeApplicationFont()
*/
@@ -2230,12 +2229,7 @@ int QFontDatabase::addApplicationFont(const QString &fileName)
with removeApplicationFont() or to retrieve the list of family names contained
in the font.
- The function returns -1 if the font could not be loaded.
-
- Currently only TrueType fonts and TrueType font collections are supported.
-
- \b{Note:} Adding application fonts on Unix/X11 platforms without fontconfig is
- currently not supported.
+ \include qfontdatabase.cpp add-application-font-doc
\sa addApplicationFont(), applicationFontFamilies(), removeApplicationFont()
*/