Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Unified Diff: Source/platform/fonts/SimpleFontData.cpp

Issue 691133002: use better heuristic for maxcharwidth (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/SimpleFontData.cpp
diff --git a/Source/platform/fonts/SimpleFontData.cpp b/Source/platform/fonts/SimpleFontData.cpp
index 44950c305ad5e2adf082ef45ed3989e9f891a0eb..6f6210b6e756949a4e8651e2591cce1ff134c113 100644
--- a/Source/platform/fonts/SimpleFontData.cpp
+++ b/Source/platform/fonts/SimpleFontData.cpp
@@ -201,10 +201,8 @@ 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()));
+ // FIXME: Skia needs to fill in fMaxCharWidth for us. [skbug.com/3087]
+ m_maxCharWidth = std::max(m_avgCharWidth, m_fontMetrics.floatAscent());
jbroman 2014/10/30 19:55:20 drive-by: this seems to be the same as the previou
#endif
#if !OS(MACOSX)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698