summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOliver Eftevaag <oliver.eftevaag@qt.io>2021-02-22 19:09:52 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-03-30 15:10:46 +0000
commitf930f6a7974d31754031463a77cdd7e560bff5f5 (patch)
tree7d6c7df8c4f70345e314d003815055a769c01351 /src
parent3dca0aaf09c7859b30adbe9e95da6840a6906d4f (diff)
Font style name 'Normal' and 'Regular' have the same meaning
Some popular fonts on linux systems follow a naming convention, where font styles are named 'Regular', 'Italic', 'Bold' and 'Bold Italic'. Qt so far only accepts the words Italic and Oblique interchangably, but not with Regular and Normal. This change will make sure that Regular is interpreted the same as the Normal font style. Fixes: QTBUG-90396 Change-Id: Ibbaf086de742c91f4d380c937ca80e846aa32a2e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 426b363761dbb4c95d263df2e4acdfab071c8018) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/dialogs/qfontdialog.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/widgets/dialogs/qfontdialog.cpp b/src/widgets/dialogs/qfontdialog.cpp
index 5aebbb88e3..2bcb40ac6d 100644
--- a/src/widgets/dialogs/qfontdialog.cpp
+++ b/src/widgets/dialogs/qfontdialog.cpp
@@ -591,6 +591,14 @@ void QFontDialogPrivate::updateStyles()
cstyle.replace(QLatin1String("Oblique"), QLatin1String("Italic"));
first = false;
goto redo;
+ } else if (cstyle.contains(QLatin1String("Regular"))) {
+ cstyle.replace(QLatin1String("Regular"), QLatin1String("Normal"));
+ first = false;
+ goto redo;
+ } else if (cstyle.contains(QLatin1String("Normal"))) {
+ cstyle.replace(QLatin1String("Normal"), QLatin1String("Regular"));
+ first = false;
+ goto redo;
}
}
if (!found)