| Index: ui/gfx/platform_font_win.cc
|
| diff --git a/ui/gfx/platform_font_win.cc b/ui/gfx/platform_font_win.cc
|
| index a9a7a43faf5f6ec43d5f3ab7ff03029c19195773..e25395d472869bb5085f95edac475aa43acfeac8 100644
|
| --- a/ui/gfx/platform_font_win.cc
|
| +++ b/ui/gfx/platform_font_win.cc
|
| @@ -98,8 +98,14 @@ Font PlatformFontWin::DeriveFontWithHeight(int height, int style) {
|
| if (GetHeight() > height) {
|
| const int min_font_size = GetMinimumFontSize();
|
| Font font = DeriveFont(-1, style);
|
| - while (font.GetHeight() > height && font.GetFontSize() != min_font_size) {
|
| + int font_height = font.GetHeight();
|
| + int font_size = font.GetFontSize();
|
| + while (font_height > height && font_size != min_font_size) {
|
| font = font.DeriveFont(-1, style);
|
| + if (font_height == font.GetHeight() && font_size == font.GetFontSize())
|
| + break;
|
| + font_height = font.GetHeight();
|
| + font_size = font.GetFontSize();
|
| }
|
| return font;
|
| }
|
|
|