commit 582296d79a143d918f30c14971c428d830f3752d
Author: Enrico Forestieri <for...@lyx.org>
Date:   Thu Aug 6 15:34:54 2020 +0200

    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 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/frontends/qt/GuiFontMetrics.cpp 
b/src/frontends/qt/GuiFontMetrics.cpp
index efd8463..9ff027e 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
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to