Index: Source/platform/fonts/SimpleFontData.cpp |
diff --git a/Source/platform/fonts/SimpleFontData.cpp b/Source/platform/fonts/SimpleFontData.cpp |
index 44950c305ad5e2adf082ef45ed3989e9f891a0eb..dca35eba0d1a4d202f30af79356c2d0fc9f74ad4 100644 |
--- a/Source/platform/fonts/SimpleFontData.cpp |
+++ b/Source/platform/fonts/SimpleFontData.cpp |
@@ -201,10 +201,10 @@ void SimpleFontData::platformInit() |
// https://crbug.com/420901 |
m_maxCharWidth = std::max(m_avgCharWidth, m_fontMetrics.floatAscent()); |
#else |
- // FIXME: This seems incorrect and should probably use fMaxCharWidth as |
- // the code path above. |
- SkScalar xRange = metrics.fXMax - metrics.fXMin; |
- m_maxCharWidth = SkScalarRoundToInt(xRange * SkScalarRoundToInt(m_platformData.size())); |
+ // Better would be to rely on either fMaxCharWidth or fAveCharWidth. |
+ // skbug.com/3087 |
+ m_maxCharWidth = SkScalarRoundToInt(metrics.fXMax - metrics.fXMin); |
+ |
#endif |
#if !OS(MACOSX) |