r23237 by jghali - #15835: "Slashed Zero" needs to be automatically disabled if the font feature "Old Style" has been selected

scribus-commit scribus-commit at lists.scribus.net
Sun Oct 6 11:36:48 UTC 2019


Author: jghali
Date: Sun Oct  6 11:36:48 2019
New Revision: 23237

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23237
Log:
#15835: "Slashed Zero" needs to be automatically disabled if the font feature "Old Style" has been selected

Modified:
    trunk/Scribus/scribus/ui/smfontfeatures.cpp

Modified: trunk/Scribus/scribus/ui/smfontfeatures.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23237&path=/trunk/Scribus/scribus/ui/smfontfeatures.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smfontfeatures.cpp	(original)
+++ trunk/Scribus/scribus/ui/smfontfeatures.cpp	Sun Oct  6 11:36:48 2019
@@ -115,6 +115,8 @@
 
 	resetFontFeatures();
 	enableFontFeatures(fontFeaturesList);
+	SlashedZeroCheck->setEnabled(true);
+
 	QStringList fontFeatures = s.split(',');
 	for (int i = 0; i < fontFeatures.count(); i++)
 	{
@@ -207,6 +209,12 @@
 		else if (fontFeatures[i] == "+ss20")
 			styleSetsMenu->actions().at(19)->setChecked(true);
 	}
+
+	if (numeralComboBox->currentData().toString() == "+onum")
+	{
+		SlashedZeroCheck->setChecked(false);
+		SlashedZeroCheck->setEnabled(false);
+	}
 }
 
 void SMFontFeatures::setFontFeatures(const QString& val, QStringList fontFeatures, bool isParentVal)
@@ -621,6 +629,12 @@
 		f.setBold(true);
 		numeralComboBox->setFont(f);
 	}
+
+	// Old Style numerals do not support slashed zero
+	bool oldStyleNumeral = (numeralComboBox->currentData().toString() == "+onum");
+	if (oldStyleNumeral)
+		SlashedZeroCheck->setChecked(false);
+	SlashedZeroCheck->setEnabled(!oldStyleNumeral);
 }
 
 void SMFontFeatures::slotWidthComboBox()




More information about the scribus-commit mailing list