Index: Source/platform/fonts/Font.cpp |
diff --git a/Source/platform/fonts/Font.cpp b/Source/platform/fonts/Font.cpp |
index b8a6c1ebdce0dc8a8d4ad20fae356a02b853a8de..caaf9792be8e69da738c22750fb1442c77803a45 100644 |
--- a/Source/platform/fonts/Font.cpp |
+++ b/Source/platform/fonts/Font.cpp |
@@ -961,21 +961,12 @@ float Font::drawComplexText(GraphicsContext* gc, const TextRunPaintInfo& runInfo |
void Font::drawEmphasisMarksForComplexText(GraphicsContext* context, const TextRunPaintInfo& runInfo, const AtomicString& mark, const FloatPoint& point) const |
{ |
GlyphBuffer glyphBuffer; |
- |
- float initialAdvance = getGlyphsAndAdvancesForComplexText(runInfo, glyphBuffer, ForTextEmphasis); |
- |
- if (glyphBuffer.isEmpty()) |
- return; |
- |
- drawEmphasisMarks(context, runInfo, glyphBuffer, mark, FloatPoint(point.x() + initialAdvance, point.y())); |
-} |
- |
-float Font::getGlyphsAndAdvancesForComplexText(const TextRunPaintInfo& runInfo, GlyphBuffer& glyphBuffer, ForTextEmphasisOrNot forTextEmphasis) const |
-{ |
HarfBuzzShaper shaper(this, runInfo.run, HarfBuzzShaper::ForTextEmphasis); |
shaper.setDrawRange(runInfo.from, runInfo.to); |
- shaper.shape(&glyphBuffer); |
- return 0; |
+ if (!shaper.shape(&glyphBuffer) || glyphBuffer.isEmpty()) |
+ return; |
+ |
+ drawEmphasisMarks(context, runInfo, glyphBuffer, mark, point); |
} |
float Font::floatWidthForComplexText(const TextRun& run, HashSet<const SimpleFontData*>* fallbackFonts, IntRectExtent* glyphBounds) const |