diff --git a/src/qt6ct/fontspage.cpp b/src/qt6ct/fontspage.cpp index 0631535..3e32c5b 100644 --- a/src/qt6ct/fontspage.cpp +++ b/src/qt6ct/fontspage.cpp @@ -71,11 +71,18 @@ void FontsPage::onFontChangeRequested(QWidget *widget) { bool ok = false; QFont font = QFontDialog::getFont (&ok, widget->font(), this); - if(ok) - { - widget->setFont(font); - qobject_cast(widget)->setText(font.family () + " " + QString::number(font.pointSize ())); - } + if(!ok) + return; + + if(font.weight() == QFont::Normal + && (font.styleName() == QLatin1String("Regular") + || font.styleName() == QLatin1String("Normal") + || font.styleName() == QLatin1String("Book") + || font.styleName() == QLatin1String("Roman"))) + font.setStyleName(QString()); + + widget->setFont(font); + qobject_cast(widget)->setText(font.family () + " " + QString::number(font.pointSize ())); } void FontsPage::readSettings()