summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/wx/FontWx.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/graphics/wx/FontWx.cpp')
-rw-r--r--WebCore/platform/graphics/wx/FontWx.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/WebCore/platform/graphics/wx/FontWx.cpp b/WebCore/platform/graphics/wx/FontWx.cpp
index cc45ab0..c01e249 100644
--- a/WebCore/platform/graphics/wx/FontWx.cpp
+++ b/WebCore/platform/graphics/wx/FontWx.cpp
@@ -98,6 +98,14 @@ FloatRect Font::selectionRectForComplexText(const TextRun& run, const FloatPoint
#endif
}
+float Font::getGlyphsAndAdvancesForComplexText(const TextRun& /* run */, int /* from */, int /* to */, GlyphBuffer& /* glyphBuffer */, ForTextEmphasisOrNot /* forTextEmphasis */) const
+{
+ // FIXME: Implement this by moving most of the drawComplexText() implementation in here. Set up the
+ // ComplexTextController according to forTextEmphasis.
+ notImplemented();
+ return 0;
+}
+
void Font::drawComplexText(GraphicsContext* context, const TextRun& run, const FloatPoint& point, int from, int to) const
{
#if OS(WINDOWS) || OS(DARWIN)
@@ -130,12 +138,22 @@ void Font::drawComplexText(GraphicsContext* context, const TextRun& run, const F
// Draw the glyph buffer now at the starting point returned in startX.
FloatPoint startPoint(startX, point.y());
- drawGlyphBuffer(context, glyphBuffer, run, startPoint);
+ drawGlyphBuffer(context, glyphBuffer, startPoint);
#else
notImplemented();
#endif
}
+void Font::drawEmphasisMarksForComplexText(GraphicsContext* context, const TextRun& run, const AtomicString& mark, const FloatPoint& point, int from, int to) const
+{
+ GlyphBuffer glyphBuffer;
+ float initialAdvance = getGlyphsAndAdvancesForComplexText(run, from, to, glyphBuffer, ForTextEmphasis);
+
+ if (glyphBuffer.isEmpty())
+ return;
+
+ drawEmphasisMarks(context, glyphBuffer, mark, FloatPoint(point.x() + initialAdvance, point.y()));
+}
float Font::floatWidthForComplexText(const TextRun& run, HashSet<const SimpleFontData*>* fallbackFonts, GlyphOverflow*) const
{