From 5b8eb3a5b8f1dfab8c7ac70b2e7294590b253db9 Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 2 May 2024 19:36:23 +0400 Subject: [PATCH] Don't adjust monospace font size. --- ui/style/style_core_font.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/style/style_core_font.cpp b/ui/style/style_core_font.cpp index 488edfc..fc5e3ee 100644 --- a/ui/style/style_core_font.cpp +++ b/ui/style/style_core_font.cpp @@ -188,7 +188,7 @@ struct Metrics { const auto family = font.family(); const auto basic = u"Open Sans"_q; - if (family == basic) { + if (family == basic || !adjust) { return simple(); } @@ -334,7 +334,7 @@ struct Metrics { } font.setPixelSize(size); - const auto adjust = (overriden && !skipSizeAdjustment); + const auto adjust = !skipSizeAdjustment && (overriden || system); const auto metrics = ComputeMetrics(font, adjust); font.setPixelSize(metrics.pixelSize);