diff options
Diffstat (limited to 'Source/WebCore/platform/graphics/qt/FontCascadeQt.cpp')
-rw-r--r-- | Source/WebCore/platform/graphics/qt/FontCascadeQt.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/WebCore/platform/graphics/qt/FontCascadeQt.cpp b/Source/WebCore/platform/graphics/qt/FontCascadeQt.cpp index 1ead333ce..47bcd8df6 100644 --- a/Source/WebCore/platform/graphics/qt/FontCascadeQt.cpp +++ b/Source/WebCore/platform/graphics/qt/FontCascadeQt.cpp @@ -24,9 +24,7 @@ #include "Font.h" -#include "AffineTransform.h" #include "FontDescription.h" -#include "FontSelector.h" #include "GlyphBuffer.h" #include "Gradient.h" #include "GraphicsContext.h" @@ -264,8 +262,13 @@ void FontCascade::initFormatForTextLayout(QTextLayout* layout, const TextRun& ru if (isSmallCaps()) range.format.setFontCapitalization(QFont::SmallCaps); - if (range.format.propertyCount() && range.length) + if (range.format.propertyCount() && range.length) { +#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) + layout->setFormats(QVector<QTextLayout::FormatRange>() << range); +#else layout->setAdditionalFormats(QList<QTextLayout::FormatRange>() << range); +#endif + } } bool FontCascade::canReturnFallbackFontsForComplexText() |