From 582296d79a143d918f30c14971c428d830f3752d Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Thu, 6 Aug 2020 15:34:54 +0200 Subject: [PATCH] Correctly compute metrics for single-char non-math fonts As evidenced by the comment, this corrects a thinko. --- src/frontends/qt/GuiFontMetrics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontends/qt/GuiFontMetrics.cpp b/src/frontends/qt/GuiFontMetrics.cpp index efd8463453..9ff027eb08 100644 --- a/src/frontends/qt/GuiFontMetrics.cpp +++ b/src/frontends/qt/GuiFontMetrics.cpp @@ -241,7 +241,7 @@ int GuiFontMetrics::width(docstring const & s) const int w = 0; // is the string a single character from a math font ? #if QT_VERSION >= 0x040800 - bool const math_char = s.length() == 1 || font_.styleName() == "LyX"; + bool const math_char = s.length() == 1 && font_.styleName() == "LyX"; #else bool const math_char = s.length() == 1; #endif