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..0648a8bf14c43f3967c8a42ab281069641ddf25e 100644 |
--- a/ui/gfx/platform_font_win.cc |
+++ b/ui/gfx/platform_font_win.cc |
@@ -509,11 +509,12 @@ 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) |
Alexei Svitkine (slow)
2015/01/29 20:52:10
Nit:
Usually, there's a : after the TODO(name) an
ananta
2015/01/29 21:04:58
Done.
|
+ // 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; |