From 0b7516b02c573e94d6507fe7d36d59147f40e6bb Mon Sep 17 00:00:00 2001 From: Carmelo Messina Date: Wed, 17 Apr 2024 21:04:24 +0200 Subject: [PATCH] Do not use Windows ClearType Text Tuner setting --- ...Windows-ClearType-Text-Tuner-setting.patch | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 build/patches/Do-not-use-Windows-ClearType-Text-Tuner-setting.patch diff --git a/build/patches/Do-not-use-Windows-ClearType-Text-Tuner-setting.patch b/build/patches/Do-not-use-Windows-ClearType-Text-Tuner-setting.patch new file mode 100644 index 00000000..a1fffdaa --- /dev/null +++ b/build/patches/Do-not-use-Windows-ClearType-Text-Tuner-setting.patch @@ -0,0 +1,43 @@ +From: uazo +Date: Tue, 16 Apr 2024 12:29:29 +0000 +Subject: Do not use Windows ClearType Text Tuner setting + +License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html +--- + ui/gfx/font_render_params_win.cc | 4 ++-- + ui/gfx/font_util_win.cc | 1 + + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/ui/gfx/font_render_params_win.cc b/ui/gfx/font_render_params_win.cc +--- a/ui/gfx/font_render_params_win.cc ++++ b/ui/gfx/font_render_params_win.cc +@@ -22,6 +22,7 @@ namespace gfx { + namespace { + + FontRenderParams::SubpixelRendering GetSubpixelRenderingGeometry() { ++ if ((true)) return FontRenderParams::SUBPIXEL_RENDERING_NONE; + DWORD pixel_structure; + base::win::RegKey key = FontUtilWin::GetTextSettingsRegistryKey(); + if (key.Valid() && +@@ -75,8 +76,7 @@ class CachedFontRenderParams { + params_->hinting = FontRenderParams::HINTING_MEDIUM; + params_->subpixel_rendering = FontRenderParams::SUBPIXEL_RENDERING_NONE; + +- BOOL enabled = false; +- if (SystemParametersInfo(SPI_GETFONTSMOOTHING, 0, &enabled, 0) && enabled) { ++ if ((true)) { + params_->antialiasing = true; + params_->subpixel_positioning = true; + +diff --git a/ui/gfx/font_util_win.cc b/ui/gfx/font_util_win.cc +--- a/ui/gfx/font_util_win.cc ++++ b/ui/gfx/font_util_win.cc +@@ -52,6 +52,7 @@ TextParameters GetTextParameters() { + + // static + base::win::RegKey FontUtilWin::GetTextSettingsRegistryKey(REGSAM access) { ++ if ((true)) return base::win::RegKey{}; + DISPLAY_DEVICE display_device = {sizeof(DISPLAY_DEVICE)}; + for (int i = 0; EnumDisplayDevices(nullptr, i, &display_device, 0); ++i) { + // TODO(scottmg): We only support the primary device currently. +--