]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiDelimiter.cpp
Fix bug #9990: Oversized & Incorrect Glyphs in Math Delimiter Dialog
[lyx.git] / src / frontends / qt4 / GuiDelimiter.cpp
index 2df0c01370dbc1b8419a9c3dfdca87a5822165ee..31903fc8b46bc0e1a808ad4c9091b3b3844c925b 100644 (file)
@@ -100,14 +100,14 @@ void initMathSymbols()
        // defined with non-unicode ids for use within mathed.
        // FIXME 2: We should fill-in this map with the parsed "symbols"
        // file done in MathFactory.cpp.
-       math_symbols_["("] = MathSymbol('(');
-       math_symbols_[")"] = MathSymbol(')');
-       math_symbols_["{"] = MathSymbol('{');
-       math_symbols_["}"] = MathSymbol('}');
-       math_symbols_["["] = MathSymbol('[');
-       math_symbols_["]"] = MathSymbol(']');
-       math_symbols_["|"] = MathSymbol('|');
-       math_symbols_["/"] = MathSymbol('/', 54, CMSY_FAMILY);
+       math_symbols_["("] = MathSymbol('(', 40, CMR_FAMILY);
+       math_symbols_[")"] = MathSymbol(')', 41, CMR_FAMILY);
+       math_symbols_["{"] = MathSymbol('{', 102, CMSY_FAMILY);
+       math_symbols_["}"] = MathSymbol('}', 103, CMSY_FAMILY);
+       math_symbols_["["] = MathSymbol('[', 91, CMR_FAMILY);
+       math_symbols_["]"] = MathSymbol(']', 93, CMR_FAMILY);
+       math_symbols_["|"] = MathSymbol('|', 106, CMSY_FAMILY);
+       math_symbols_["/"] = MathSymbol('/', 47, CMR_FAMILY);
        math_symbols_["backslash"] = MathSymbol('\\', 110, CMSY_FAMILY);
        math_symbols_["lceil"] = MathSymbol(0x2308, 100, CMSY_FAMILY);
        math_symbols_["rceil"] = MathSymbol(0x2309, 101, CMSY_FAMILY);
@@ -188,22 +188,12 @@ GuiDelimiter::GuiDelimiter(GuiView & lv)
        for (int i = 0; i < end; ++i) {
                string const delim = latex_delimiters[i];
                MathSymbol const & ms = mathSymbol(delim);
-// Due to a bug in Qt 4 on Windows, we need to use our math symbol font
-// on Windows, which results in sub-optimal glyph display (see #5760).
-// FIXME: Re-check after Windows has settled to Qt 5.
-#if defined(_WIN32)
                QString symbol(ms.fontcode?
                        QChar(ms.fontcode) : toqstr(docstring(1, ms.unicode)));
                QListWidgetItem * lwi = new QListWidgetItem(symbol);
                FontInfo lyxfont;
                lyxfont.setFamily(ms.fontfamily);
                QFont font = frontend::getFont(lyxfont);
-#else
-               QString symbol(QChar(ms.unicode));
-               QListWidgetItem * lwi = new QListWidgetItem(symbol);
-               QFont font = lwi->font();
-               font.setPointSize(2 * font.pointSize());
-#endif
                lwi->setFont(font);
                lwi->setToolTip(toqstr(delim));
                list_items[ms.unicode] = lwi;
@@ -219,14 +209,6 @@ GuiDelimiter::GuiDelimiter(GuiView & lv)
        // The last element is the empty one.
        QListWidgetItem * lwi = new QListWidgetItem(qt_("(None)"));
        QListWidgetItem * rwi = new QListWidgetItem(qt_("(None)"));
-// See above comment.
-// FIXME: Re-check after Windows has settled to Qt 5.
-#if !defined(_WIN32)
-       QFont font = lwi->font();
-       font.setPointSize(2 * font.pointSize());
-       lwi->setFont(font);
-       rwi->setFont(font);
-#endif
        leftLW->addItem(lwi);
        rightLW->addItem(rwi);