]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiFontMetrics.cpp
Fix crash
[lyx.git] / src / frontends / qt4 / GuiFontMetrics.cpp
index 2f598f43dc7ec73d5d257fdb1b2401f949ab92ed..2ab182ec33aef23aaae29fb47facd24b0d527181 100644 (file)
@@ -186,7 +186,8 @@ int GuiFontMetrics::width(docstring const & s) const
 #endif
        /* For some reason QMetrics::width returns a wrong value with Qt5
         * with some arabic text. OTOH, QTextLayout is broken for single
-        * characters with null width (like \not in mathed).
+        * characters with null width (like \not in mathed). Also, as a
+        * safety measure, always use QMetrics::width with our math fonts.
        */
        int w = 0;
        if (s.length() == 1