]> git.lyx.org Git - lyx.git/commitdiff
Correctly compute metrics for single-char non-math fonts
authorEnrico Forestieri <forenr@lyx.org>
Thu, 6 Aug 2020 13:34:54 +0000 (15:34 +0200)
committerEnrico Forestieri <forenr@lyx.org>
Thu, 6 Aug 2020 13:34:54 +0000 (15:34 +0200)
As evidenced by the comment, this corrects a thinko.

src/frontends/qt/GuiFontMetrics.cpp

index efd84634539961b0750a0ca15bbb1cf526b47ef6..9ff027eb089b8a1e68b70827b2497818452a6e0e 100644 (file)
@@ -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