Index: ui/gfx/platform_font_win.cc |
diff --git a/ui/gfx/platform_font_win.cc b/ui/gfx/platform_font_win.cc |
index f2b809b84b93952d6e662cb368d59142b6c18f00..8d8702edabc7d8f0f2b38695cf047be7455e95bf 100644 |
--- a/ui/gfx/platform_font_win.cc |
+++ b/ui/gfx/platform_font_win.cc |
@@ -509,11 +509,11 @@ PlatformFontWin::HFontRef* PlatformFontWin::CreateHFontRefFromSkia( |
// The metrics retrieved from skia don't have the average character width. In |
// any case if we get the average character width from skia then use that or |
- // use the text extent technique as documented by microsoft. See |
- // GetAverageCharWidthInDialogUnits for details. |
+ // the average character width in the TEXTMETRIC structure. |
+ // TODO(ananta): Investigate whether it is possible to retrieve this value |
+ // from DirectWrite. |
const int ave_char_width = |
- skia_metrics.fAvgCharWidth == 0 ? |
- HFontRef::GetAverageCharWidthInDialogUnits(gdi_font) |
+ skia_metrics.fAvgCharWidth == 0 ? font_metrics.tmAveCharWidth |
: skia_metrics.fAvgCharWidth; |
int style = 0; |