Correctly compute metrics for single-char non-math fonts

As evidenced by the comment, this corrects a thinko.
This commit is contained in:
Enrico Forestieri 2020-08-06 15:34:54 +02:00
parent 7bbc4270ad
commit 582296d79a

View File

@ -241,7 +241,7 @@ int GuiFontMetrics::width(docstring const & s) const
int w = 0; int w = 0;
// is the string a single character from a math font ? // is the string a single character from a math font ?
#if QT_VERSION >= 0x040800 #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 #else
bool const math_char = s.length() == 1; bool const math_char = s.length() == 1;
#endif #endif