forked from qt-creator/qt-creator
Utils: Quote font-face in StyleHelper::fontToCssProperties
Font faces should be quoted. '.AppleSystemUIFont', which is the default on macOS, would break the CSS parsing if not quoted. This change uses single quotes (which is equivalent with double) for the task, because inline CSS in HTML is usually already quoted with double quotes. Change-Id: I08d8de1131f58a9c968cf45acc636cb2b3b21700 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -998,7 +998,7 @@ QString StyleHelper::fontToCssProperties(const QFont &font)
|
||||
? "normal" : font.style() == QFont::StyleItalic
|
||||
? "italic" : "oblique");
|
||||
const QString fontShorthand = fontStyle + " " + QString::number(font.weight()) + " "
|
||||
+ fontSize + " " + font.family();
|
||||
+ fontSize + " '" + font.family() + "'";
|
||||
const QString textDecoration = QLatin1String(font.underline() ? "underline" : "none");
|
||||
const QString textTransform = QLatin1String(font.capitalization() == QFont::AllUppercase
|
||||
? "uppercase"
|
||||
|
Reference in New Issue
Block a user