| Index: ui/base/l10n/l10n_util_win.cc
|
| diff --git a/ui/base/l10n/l10n_util_win.cc b/ui/base/l10n/l10n_util_win.cc
|
| index cd5b519d1de9bf4553f5476d0b471773ef8d7096..ee3ca9532e4e0cfa0c8cc098a77b593a695ab672 100644
|
| --- a/ui/base/l10n/l10n_util_win.cc
|
| +++ b/ui/base/l10n/l10n_util_win.cc
|
| @@ -18,7 +18,7 @@
|
| #include "base/win/windows_version.h"
|
| #include "ui/base/l10n/l10n_util.h"
|
| #include "ui/display/display.h"
|
| -#include "ui/display/win/dpi.h"
|
| +#include "ui/display/win/screen_win.h"
|
| #include "ui/strings/grit/app_locale_settings.h"
|
|
|
| namespace {
|
| @@ -155,12 +155,10 @@ bool NeedOverrideDefaultUIFont(base::string16* override_font_family,
|
| }
|
|
|
| void AdjustUIFont(LOGFONT* logfont) {
|
| - float dpi_scale = display::win::GetDPIScale();
|
| - if (display::Display::HasForceDeviceScaleFactor()) {
|
| - // If the scale is forced, we don't need to adjust it here.
|
| - dpi_scale = 1.0f;
|
| - }
|
| - AdjustUIFontForDIP(dpi_scale, logfont);
|
| + // Use the unforced scale so the font will be normalized to the correct DIP
|
| + // value. That way it'll appear the right size when the forced scale is
|
| + // applied later (when coverting to pixels).
|
| + AdjustUIFontForDIP(display::win::ScreenWin::GetSystemScaleFactor(), logfont);
|
| }
|
|
|
| void AdjustUIFontForDIP(float dpi_scale, LOGFONT* logfont) {
|
|
|