From: Enrico Forestieri Date: Thu, 6 Aug 2020 13:34:54 +0000 (+0200) Subject: Correctly compute metrics for single-char non-math fonts X-Git-Tag: lyx-2.4.0dev-acb2ca7b~441 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=582296d79a143d918f30c14971c428d830f3752d;hp=7bbc4270ad14bf1d30dd819290ec4719bfe6be9f;p=lyx.git Correctly compute metrics for single-char non-math fonts As evidenced by the comment, this corrects a thinko. --- 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