diff options
-rw-r--r-- | WebCore/platform/graphics/android/FontAndroid.cpp | 2 | ||||
-rw-r--r-- | WebCore/platform/graphics/android/FontDataAndroid.cpp | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/WebCore/platform/graphics/android/FontAndroid.cpp b/WebCore/platform/graphics/android/FontAndroid.cpp index 36c6248..0a67188 100644 --- a/WebCore/platform/graphics/android/FontAndroid.cpp +++ b/WebCore/platform/graphics/android/FontAndroid.cpp @@ -211,7 +211,7 @@ void Font::drawComplexText(GraphicsContext* gc, TextRun const& run, paint); } -float Font::floatWidthForComplexText(const TextRun& run, HashSet<const SimpleFontData*>*) const +float Font::floatWidthForComplexText(const TextRun& run, HashSet<const SimpleFontData*>*, GlyphOverflow*) const { SkPaint paint; diff --git a/WebCore/platform/graphics/android/FontDataAndroid.cpp b/WebCore/platform/graphics/android/FontDataAndroid.cpp index c915eae..c9b1d37 100644 --- a/WebCore/platform/graphics/android/FontDataAndroid.cpp +++ b/WebCore/platform/graphics/android/FontDataAndroid.cpp @@ -95,7 +95,7 @@ void SimpleFontData::determinePitch() m_treatAsFixedPitch = false; } -float SimpleFontData::platformWidthForGlyph(Glyph glyph) const +GlyphMetrics SimpleFontData::platformMetricsForGlyph(Glyph glyph, GlyphMetricsMode) const { SkASSERT(sizeof(glyph) == 2); // compile-time assert @@ -103,12 +103,16 @@ float SimpleFontData::platformWidthForGlyph(Glyph glyph) const m_platformData.setupPaint(&paint); + float advanceWidth; if (EmojiFont::IsEmojiGlyph(glyph)) - return EmojiFont::GetAdvanceWidth(glyph, paint); + advanceWidth = EmojiFont::GetAdvanceWidth(glyph, paint); else { paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding); - return SkScalarToFloat(paint.measureText(&glyph, 2)); + advanceWidth = SkScalarToFloat(paint.measureText(&glyph, 2)); } + GlyphMetrics metrics; + metrics.horizontalAdvance = advanceWidth; + return metrics; } } |