commit 0c3643ada95e9f0996d93a629b3de39b7fc25e74
Author: Guillaume Munch <[email protected]>
Date:   Wed Feb 17 21:45:44 2016 +0000

    Set the preamble in fixed-width font and without line breaks (#9966)

diff --git a/src/frontends/qt4/GuiDocument.cpp 
b/src/frontends/qt4/GuiDocument.cpp
index cf64849..60aee1c 100644
--- a/src/frontends/qt4/GuiDocument.cpp
+++ b/src/frontends/qt4/GuiDocument.cpp
@@ -453,6 +453,11 @@ PreambleModule::PreambleModule() : current_id_(0)
        // This is not a memory leak. The object will be destroyed
        // with this.
        (void) new LaTeXHighlighter(preambleTE->document());
+       QFont font(guiApp->typewriterFontName());
+       font.setFixedPitch(true);
+       font.setStyleHint(QFont::TypeWriter);
+       preambleTE->setFont(font);
+       preambleTE->setWordWrapMode(QTextOption::NoWrap);
        setFocusProxy(preambleTE);
        connect(preambleTE, SIGNAL(textChanged()), this, SIGNAL(changed()));
 }

Reply via email to