diff --git a/src/frontends/qt4/GuiPrefs.cpp b/src/frontends/qt4/GuiPrefs.cpp index fe5330d84d..5a2c3268f9 100644 --- a/src/frontends/qt4/GuiPrefs.cpp +++ b/src/frontends/qt4/GuiPrefs.cpp @@ -14,6 +14,7 @@ #include "qt_helpers.h" #include "GuiApplication.h" +#include "GuiFontLoader.h" #include "BufferList.h" #include "Color.h" @@ -40,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -469,6 +471,11 @@ void PrefScreenFonts::apply(LyXRC & rc) const || rc.sans_font_name != oldrc.sans_font_name || rc.typewriter_font_name != oldrc.typewriter_font_name || rc.zoom != oldrc.zoom || rc.dpi != oldrc.dpi) { + // The global QPixmapCache is used in GuiPainter to cache text + // painting so we must reset it in case any of the above + // parameter is changed. + QPixmapCache::clear(); + guiApp->fontLoader().update(); form_->updateScreenFonts(); } }