diff options
author | Steve Block <steveblock@google.com> | 2010-04-28 15:59:17 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-05-11 14:42:12 +0100 |
commit | d2816f16f713bc58b245e2d5c5fd16ac4bb32cb8 (patch) | |
tree | 71cbcab222637e6bd77a3880d3671656472e838c /WebCore/platform/graphics/android/FontDataAndroid.cpp | |
parent | 0c3375cc49016da4a394db00595be9cf605093b1 (diff) | |
download | external_webkit-d2816f16f713bc58b245e2d5c5fd16ac4bb32cb8.zip external_webkit-d2816f16f713bc58b245e2d5c5fd16ac4bb32cb8.tar.gz external_webkit-d2816f16f713bc58b245e2d5c5fd16ac4bb32cb8.tar.bz2 |
Merge webkit.org at r58033 : Update font method signatures
See http://trac.webkit.org/changeset/57215
Change-Id: I441f2905fe3882d3da2f4e9c8084a7d09d94b6f6
Diffstat (limited to 'WebCore/platform/graphics/android/FontDataAndroid.cpp')
-rw-r--r-- | WebCore/platform/graphics/android/FontDataAndroid.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
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; } } |