summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/WebCore/platform/graphics/GlyphBuffer.h16
-rw-r--r--Source/WebCore/platform/graphics/WidthIterator.h8
2 files changed, 21 insertions, 3 deletions
diff --git a/Source/WebCore/platform/graphics/GlyphBuffer.h b/Source/WebCore/platform/graphics/GlyphBuffer.h
index 5feafb140..3aec08e65 100644
--- a/Source/WebCore/platform/graphics/GlyphBuffer.h
+++ b/Source/WebCore/platform/graphics/GlyphBuffer.h
@@ -56,6 +56,8 @@ class SimpleFontData;
typedef cairo_glyph_t GlyphBufferGlyph;
#elif OS(WINCE)
typedef wchar_t GlyphBufferGlyph;
+#elif PLATFORM(QT)
+typedef quint32 GlyphBufferGlyph;
#else
typedef Glyph GlyphBufferGlyph;
#endif
@@ -89,6 +91,18 @@ public:
private:
float advance;
};
+#elif PLATFORM(QT)
+struct GlyphBufferAdvance : public QPointF {
+public:
+ GlyphBufferAdvance(const QPointF& advance)
+ : QPointF(advance)
+ {
+ }
+
+ void setWidth(qreal width) { QPointF::setX(width); }
+ qreal width() const { return QPointF::x(); }
+ qreal height() const { return QPointF::y(); }
+};
#else
typedef FloatSize GlyphBufferAdvance;
#endif
@@ -156,6 +170,8 @@ public:
m_advances.append(advance);
#elif OS(WINCE)
m_advances.append(width);
+#elif PLATFORM(QT)
+ m_advances.append(QPointF(width, 0));
#else
m_advances.append(FloatSize(width, 0));
#endif
diff --git a/Source/WebCore/platform/graphics/WidthIterator.h b/Source/WebCore/platform/graphics/WidthIterator.h
index 1996a0978..8e4e06997 100644
--- a/Source/WebCore/platform/graphics/WidthIterator.h
+++ b/Source/WebCore/platform/graphics/WidthIterator.h
@@ -61,13 +61,15 @@ public:
static bool supportsTypesettingFeatures(const Font& font)
{
-#if !PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED <= 1080
- return !font.typesettingFeatures();
-#else
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED > 1080
if (!font.isPrinterFont())
return !font.typesettingFeatures();
return !(font.typesettingFeatures() & ~(Kerning | Ligatures));
+#elif PLATFORM(QT) && QT_VERSION >= 0x050100
+ return !(font.typesettingFeatures() & ~Kerning) && !font.isSmallCaps();
+#else
+ return !font.typesettingFeatures();
#endif
}